Hey all,
I have a simple if() statement (see below) that I need to generate a JavaScript alert when the result of the elseif() inside the statement is true.
//Check to see if the system ID exists
if(isset($id)){
$id_query = mysql_query("SELECT id FROM nuke_trakker_system WHERE id = '".$id."'");
if(mysql_num_rows($id_query) == 0){
echo "We're sorry but the system ID you have entered is invalid. Please check the ID and try again.";
}
elseif(mysql_num_rows($id_query) == 1){
echo "<script language=JavaScript>";
echo "window.alert('Pleaes note that your machine is NOT ready for pickup until Status reads: Service Completed!\n\nThank You for your business!');";
echo "</script>";
}
}
Right now the pages works and no errors are given, all the pertinent information is displayed but the JavaScript alert is not processed. Any ideas? I'm not trying to redirect or anything. Simply alert the user to the notice in the window.alert(); before they see their information.
Thanks!