In my member.php page I have the following alerts:
if (isset($_GET['success']) == 'no')
{
echo"<script type=\"text/javascript\">".
"alert('You can't remove any more services! Please contact admin if you would like your account disabled');".
"</script>";
}
if (isset($_GET['success']) == 'yes') {
echo"<script type=\"text/javascript\">".
"alert('Your details have been updated!');".
"</script>";
}
In delete.php I use the following code: (relevant code only)
if($numJobs < 2)
{
header('Location: member.php?success=no&username='.$username);
exit();
}
In update.php I use this code:
if(success){
header('Location: member.php?success=yes&username='.$username);
exit ();
}
No matter how I edit the alerts, the alert 'Your details have been updated!'
is all that is executed. In the URL I can see the success = no
so I don't understand why its not working.