Jump to content

Does DIE kill SESSIONS?


AV1611

Recommended Posts

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]
Link to comment
https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/
Share on other sites

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]
Link to comment
https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/#findComment-45138
Share on other sites

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]
Link to comment
https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/#findComment-45166
Share on other sites

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]
Link to comment
https://forums.phpfreaks.com/topic/11894-does-die-kill-sessions/#findComment-45930
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.