Hi guys, I have a php page and the alert i write in JavaScript. When the users fill up the form and click on submit button on next page it will out the alert if do not fill up the name. So the question how can make it display on the same page when user didnt fill up complete of the form
Here the code:
if($from == '') {echo "<script langauge=\"javascript\">alert('Mail not Sent, You have not entered a Name, please go back fill up and try again!!')</script>";}
else {
if($phone == '') {echo "<script langauge=\"javascript\">alert('Mail not Sent,You have not entered a Phone Ext, please go back fill up and try again!!')</script>";}
else {
if($subject== '') {echo "<script langauge=\"javascript\">alert('Mail not Sent,You have not entered a Subject, please go back and try again!!')</script>";}
else
{
$ok = @mail($to, $subject, $message, $headers)