私の member.php ページには、次のアラートがあります。
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>";
}
delete.php では、次のコードを使用します: (関連するコードのみ)
if($numJobs < 2)
{
header('Location: member.php?success=no&username='.$username);
exit();
}
update.php では、次のコードを使用します。
if(success){
header('Location: member.php?success=yes&username='.$username);
exit ();
}
どのようにアラートを編集しても、'Your details have been updated!'
実行されるのはアラートだけです。URL に が表示されるsuccess = no
ので、なぜ機能しないのかわかりません。