Jump to content

Archived

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

AV1611

Does DIE kill SESSIONS?

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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites
If the form inputs are incorrect, you should reload the page for them and fill the data back in from the POST/GET array.

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

×

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.