knowledge_6 Posted February 9, 2007 Share Posted February 9, 2007 Here is the second of my code that has the validation: its a basic form for RSVP for a wedding.. i do not want to direct them to another page with just one line with the alert message.. i just want a pop up box alerting them like in javascript... is there a way to do this in php? if($from == '') {print "What are you thinking not filling in your e-mail address? Go back and do it!!!";} else { if($name == '') {print "What are you thinking not filling in your name? go back and do it!!!";} Link to comment https://forums.phpfreaks.com/topic/37794-solved-php-form-validation-alerts/ Share on other sites More sharing options...
Orio Posted February 9, 2007 Share Posted February 9, 2007 Umm... <?php if($form == "") echo "<script>alert(\"What are you thinking not filling in your e-mail address? Go back and do it!!!\")</script>"; ?> Orio. Link to comment https://forums.phpfreaks.com/topic/37794-solved-php-form-validation-alerts/#findComment-180801 Share on other sites More sharing options...
knowledge_6 Posted February 9, 2007 Author Share Posted February 9, 2007 thanks i missing the <script></script> hahaha stupid thanks Link to comment https://forums.phpfreaks.com/topic/37794-solved-php-form-validation-alerts/#findComment-180814 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.