I have a function of activation code
function active($activationcode)
{
$sql = "SELECT * FROM users WHERE activationcode = '$activationcode';";
$obj_db = new DB();
$obj_db->query($sql);
$row = $obj_db->rsset();
$id = $row[id];
$obj_db->db_close();
return $id;
}
now i am calling itin another page…all i want to do is to generate random number and send the link to the user via e mail.
my function is correct . now i want this code to work . plz help me
if(isset($_GET['action']) == "Update")
{
$userActive = $Users->active($Users->_activationcode());
$Users->active($_GET['id']);
$_POST['activationcode'];
}
Change:
To:
Or better:
You were comparing the result of
isset()(boolean) with stringupdatewhich would never becometrue.