Hey everyone,
Can anybody suggest a way for me to stop a script if there is an error, but allow the rest of the stuff in the page to load?
If that didn't make sense, hopefully this example will..
I've got a registartion form, that works by being include();'d, now.. if somebody leaves a field blank, I use die("You left a field blank, please go back and fill in all fields marked with an *");. Because I include the script, if they stuff up and make the die(); happen, half of the page will not load..
Can anybody suggest a way to halt the script (because it's a user registartion system, I can't just echo an error and let it continue, because it will add the info to the database and cause problems), but still allow the rest of the stuff in the webpage to load?
Thanks heaps!
P.S - Please don't just say 'do not include them'.. this is the only kind of answer i've got so far, and it's really not helpful at all. If I did not include them it would not look how I want it too.. and would mean i'd have to have a lot of duplicate pages.
Thanks 🙂