corillo181 Posted August 17, 2007 Share Posted August 17, 2007 i use this before to exit a script when something went wrong but i tried to use it with php include in html and when the exit or die is executed everything that is below the command does not show up.. i know how this work but my question is, is there a way to use die or exit with out your html output been disturb? Quote Link to comment https://forums.phpfreaks.com/topic/65336-exit-die/ Share on other sites More sharing options...
trq Posted August 17, 2007 Share Posted August 17, 2007 is there a way to use die or exit with out your html output been disturb? No. The function names say it all. Quote Link to comment https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326280 Share on other sites More sharing options...
dbo Posted August 17, 2007 Share Posted August 17, 2007 I personally don't think either of the two are a very graceful way of handling errors. Quote Link to comment https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326281 Share on other sites More sharing options...
corillo181 Posted August 17, 2007 Author Share Posted August 17, 2007 thanx for the input. Quote Link to comment https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326289 Share on other sites More sharing options...
corillo181 Posted August 17, 2007 Author Share Posted August 17, 2007 i dont want to make another topic so will this unset the post or i will nees to refresh the page? $email=$_POST['email']; $password=$_POST['password']; $password2=$_POST['password2']; $checkuser=register($email,$password,$password2); if($checkuser=='Done'){ unset($_POST); } Quote Link to comment https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326302 Share on other sites More sharing options...
trq Posted August 17, 2007 Share Posted August 17, 2007 Yes, that will unset the $_POST array. Quote Link to comment https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326330 Share on other sites More sharing options...
d22552000 Posted August 17, 2007 Share Posted August 17, 2007 -_________________- Why would you ever want to reset the entire post array!? Quote Link to comment https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326344 Share on other sites More sharing options...
solarisuser Posted August 17, 2007 Share Posted August 17, 2007 You should probably post your code and tell everyone what you're trying to do... i dont want to make another topic so will this unset the post or i will nees to refresh the page? $email=$_POST['email']; $password=$_POST['password']; $password2=$_POST['password2']; $checkuser=register($email,$password,$password2); if($checkuser=='Done'){ unset($_POST); } Quote Link to comment https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326432 Share on other sites More sharing options...
corillo181 Posted August 17, 2007 Author Share Posted August 17, 2007 because thats is like a sign up from so once the check user is set to done that means that the user information is in the database and a email has been sent.. so anything that has sent from the form there is no use for it. i keep the scrip in the same page so i don't want a error if someone refresh the page and the post values try to reenter. Quote Link to comment https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326573 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.