Hello,
basically I want to know if there is any type of script that can be used to block a page from loading.
The reason is that i want to be able to change a mysql database entry from "open" to "block", and have a php function that will check that row and, if it says block then stop the script from reading on, and simply stop anything from loading. If it says open, then i want it to simply read on and execute the script.
This may not make a lot of sense as far as the reasoning, but any ideas help.
Thanks
stop a page from loading
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: stop a page from loading
you can use exit() to terminate the script execution. I.e.,
Code: Select all
if ($row['status'] == 'block') {
exit();
}
//rest of code here