[SOLVED] die() and exit() stopping html code?
Posted: Wed Mar 02, 2005 4:19 pm
Hi!
I have a login on my site and I use a checkuser() function everytime the user opens a site where you have to be logged in. So the scripts runs the checkuser function and if the session username/password is wrong, it echos a message, and on the end it runs "exit();" so it doesn't show the rest of the code in the original admin-site file. My problem is that it "stops" the whole site, when the exit(); is executed the server stops sending the rest of the html file. I only want the php code to stop executing, because this is in the middle of a table and the site and error message doesn't look good when it isn't closed. Do you have any tips how to make that possible?
I have a login on my site and I use a checkuser() function everytime the user opens a site where you have to be logged in. So the scripts runs the checkuser function and if the session username/password is wrong, it echos a message, and on the end it runs "exit();" so it doesn't show the rest of the code in the original admin-site file. My problem is that it "stops" the whole site, when the exit(); is executed the server stops sending the rest of the html file. I only want the php code to stop executing, because this is in the middle of a table and the site and error message doesn't look good when it isn't closed. Do you have any tips how to make that possible?