Imtehbegginer Posted February 24, 2007 Share Posted February 24, 2007 I was wondering if I could give an error, that would STOP the script, but not cut out the rest of the page? Is there anyway to do this? For example. if($pass != $pass2) { die('Passwords do not match!'); # This is where it deletes half of the page.... } Quote Link to comment Share on other sites More sharing options...
Archadian Posted February 24, 2007 Share Posted February 24, 2007 try endif; I saw it in someone's code...worth a try if($pass != $pass2) { echo "Password does not match"; endif; } Quote Link to comment Share on other sites More sharing options...
JBS103 Posted February 24, 2007 Share Posted February 24, 2007 I guess you could potentially set a variable that you could check at specific points in the script to see whether or not that piece should be run. Currently, I am unaware of any function that will do this for you. Someone with more experience may be able to offer more advice. Quote Link to comment Share on other sites More sharing options...
chrisredding Posted February 24, 2007 Share Posted February 24, 2007 Yeah, if (!$haircolour) { $err.= "Please provide your email haircolour<br>"; } and then if you code the output to remain at the same page, it'll stop at every error. Have a look at http://www.chrisredding.com/v4/gen/form/contact.php and try some obvious errors. C Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.