<?php 
if(isset($_POST['btn-save']))
{
$uid = $_POST['uid'];
$fname = $_POST['fullname'];
$email = $_POST['email'];
$refemail = $_POST['refemail'];
$phone = $_POST['phone'];
$state = $_POST['state'];
$country = $_POST['country'];
$wallet = $_POST['wallet'];
$bal = $_POST['bal'];
$prof = $_POST['profit'];
$date = $_POST['date'];
$password = $_POST['pass'];
$uid = base64_decode($uid);
$stmt = $actionParam->runQuery("SELECT * FROM tbl_user WHERE userID=:id");
$stmt->execute(array(":id"=>$uid));
$urow = $stmt->fetch(PDO::FETCH_ASSOC);
if($password != $urow['password'])
{
    $password = md5($password);
}

if($actionParam->edit_user($uid,$fname,$email,$refemail,$state,$country,$phone,$wallet,$password,$bal,$prof,$date))
{
    header("Location: registeredusers?edited");
    exit;
}
}
?>