Jump to content


Photo

Does DIE kill SESSIONS?


  • Please log in to reply
7 replies to this topic

#1 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 13 June 2006 - 04:50 PM

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...

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{


#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 13 June 2006 - 04:54 PM

no.

#3 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 13 June 2006 - 04:55 PM

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

#4 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 13 June 2006 - 05:49 PM

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) View Post[/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]


#5 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 13 June 2006 - 05:54 PM

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.

Info: PHP Manual


#6 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 13 June 2006 - 06:43 PM

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) View Post[/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]


#7 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 13 June 2006 - 07:32 PM

If the form inputs are incorrect, you should reload the page for them and fill the data back in from the POST/GET array.

Info: PHP Manual


#8 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 15 June 2006 - 03:17 PM

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) View Post[/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]





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users