include 'connections.php';
$getData="select * from ".USREG." where email='".$_SESSION['username']."'";
$reslt=mysql_query($getData, $con) or die(mysql_error());
$rows=mysql_fetch_array($reslt);
if($reslt)
{
$count=mysql_num_rows($reslt);
if($count==1)
{
$rows=mysql_fetch_array($result);
$name = $rows['name'];
$email=$rows['email'];
$password=$rows['password'];
$phone = $rows['phone'];
$address=$rows['address'];
$dob=$rows['date_of_birth'];
$education=$rows['education'];
$tbl_name2='users';
$sql2="INSERT INTO ".UTEMP."(name, email, password, phone, address, date_of_birth, education)VALUES('".$name."', '".$email."', '".$password."', '".$phone."', '".$address."', '".$dob."','".$education."') ";
$result2=mysql_query($sql2,$con) or die (mysql_error());
}
}
else
{
echo "Deactivation failed";
}
if($result2)
{
echo " your account has been successfully deactivated for reactivation please contact with our admin";
$sql3="DELETE FROM ".USREG." WHERE confirm_code='$email'";
$result3=mysql_query($sql3,$con) or die (mysql_error());
}
}
?>