AV1611 Posted June 13, 2006 Share Posted June 13, 2006 in this snippet, does the DIE at the end of the loop kill the sessions????BTW, the form is pointing to itself...if that matters...[code]IF ($row=mysql_fetch_array($result)) { $PartNoSeries=$PartNoSeries+1; ?> <form name="sform" METHOD="POST" action="CLONEpnsearch.php"> <input type="hidden" SIZE="2" name="PartNoSeries" value="<?php echo $PartNoSeries; ?>"> <input type="hidden" SIZE="1" name="PartNoExtension" value="<?php echo $PartNoExtension; ?>"> <input type="hidden" SIZE="4" name="PartNoSeriesTarget" value="AUTO"> <strong><i>Press Button to Continue Searching... </i></strong><br><br> <input type="submit" name="Submit" value=" Continue "> <?php die(); } ELSE{[/code] Quote Link to comment https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/ Share on other sites More sharing options...
trq Posted June 13, 2006 Share Posted June 13, 2006 no. Quote Link to comment https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/#findComment-45110 Share on other sites More sharing options...
kenrbnsn Posted June 13, 2006 Share Posted June 13, 2006 No, the only thing die() does is to stop the PHP processor from processing the rest of your script. Sessions go away when either you explicitly destroy them or the browser window they are associated with closes.Ken Quote Link to comment https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/#findComment-45111 Share on other sites More sharing options...
AV1611 Posted June 13, 2006 Author Share Posted June 13, 2006 On the subject, is there a way to make a session stay alive so you can click the back button and not get the session expired message?[!--quoteo(post=383360:date=Jun 13 2006, 12:55 PM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Jun 13 2006, 12:55 PM) [snapback]383360[/snapback][/div][div class=\'quotemain\'][!--quotec--]No, the only thing die() does is to stop the PHP processor from processing the rest of your script. Sessions go away when either you explicitly destroy them or the browser window they are associated with closes.Ken[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/#findComment-45138 Share on other sites More sharing options...
ober Posted June 13, 2006 Share Posted June 13, 2006 Give them a link to follow instead of letting them use the back button to navigate?? The session expired message is a browser specific item. Not all browsers display that error. Quote Link to comment https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/#findComment-45139 Share on other sites More sharing options...
AV1611 Posted June 13, 2006 Author Share Posted June 13, 2006 What I am trying to do is if the have a form come back empty, they can go back and reenter the form with different data... the form is password protected, and then a session is set it the password is good...[!--quoteo(post=383388:date=Jun 13 2006, 01:54 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Jun 13 2006, 01:54 PM) [snapback]383388[/snapback][/div][div class=\'quotemain\'][!--quotec--]Give them a link to follow instead of letting them use the back button to navigate?? The session expired message is a browser specific item. Not all browsers display that error.[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/#findComment-45166 Share on other sites More sharing options...
ober Posted June 13, 2006 Share Posted June 13, 2006 If the form inputs are incorrect, you should reload the page for them and fill the data back in from the POST/GET array. Quote Link to comment https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/#findComment-45183 Share on other sites More sharing options...
AV1611 Posted June 15, 2006 Author Share Posted June 15, 2006 Thanks, Ober!That worked perfectly...[!--quoteo(post=383433:date=Jun 13 2006, 03:32 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Jun 13 2006, 03:32 PM) [snapback]383433[/snapback][/div][div class=\'quotemain\'][!--quotec--]If the form inputs are incorrect, you should reload the page for them and fill the data back in from the POST/GET array.[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/#findComment-45930 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.