Jump to content

exit | die


corillo181

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/65336-exit-die/
Share on other sites

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);
}

Link to comment
https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326302
Share on other sites

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);
}

Link to comment
https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326432
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/65336-exit-die/#findComment-326573
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.