FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » session question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: session question [message #177671 is a reply to message #177665] Thu, 12 April 2012 17:59 Go to previous messageGo to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma:
Senior Member
Am 12.04.2012 18:43, schrieb William Gill:
> I have a site with an input form that recursively calls itself via action="<?php echo
> $_SERVER['PHP_SELF']; ?>", and a couple links with url encoded data that indicate
> simple selections w/o using a form. It uses different include('file'); statements
> based on the progress and/or choices previously made, and it works fine, but is a
> little complicated to track "state" when troubleshooting, updating, or changing.
>
> I am thinking of using a session approach which would be simpler to follow, but have
> never used sessions on a page that is recursively called.
>
> First since session_start() would be called every iteration, that will cause an error
> unless I encapsulate it in an if loop to see if the session already exists. Is this
> the preferred method?
>
> Second, when the user is finished and receives an acknowledgement I plan to call a
> session_unset() to clear things up so that if they want to do it again, they are
> beginning with a clean slate. Again, is this the preferred method?
>
>

.... and look up all the functions you want to use in the manual, read down to "See
Also", and read them as well.

/Str.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Date/Time warning
Next Topic: How to create an instance from a class name
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Dec 12 18:40:24 GMT 2024

Total time taken to generate the page: 0.04651 seconds