Re: Fw: No matter what I do, I just don't understand sessions?

From: Date: Mon, 14 Apr 2003 12:11:25 +0000
Subject: Re: Fw: No matter what I do, I just don't understand sessions?
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-19419@lists.php.net to get a copy of this message
Hi, it this case you do not need to use sessions to recognize if you are entering from form or you should to display form in your code... I don't exactly remember the new name of $REQUEST_METHOD variable (since 4.11??) version of PHP, but this example shows you (variable names from v. 4.04) how to do this: if($REQUEST_METHOD == "POST") { // entry submitted from your form // display your results } else { // display your form } HTH Piotr --- ODCS <odcs@rogers.com> wrote: > I don't know what it is or what I am missing, but > this is really getting to > be a real pain. I have a form on a page users input > info. When submit is > clicked it calls itself ($PHP_SELF). the I want to > show the results of the > info that was inputted. > > I am trying to set a session variable for this and > then use an if statement > to determine what function needs to be called. Not > sure if I'm explaining > this right, so here is what I have. > > session_start() > > if(!isset($_SESSION['continue'] ) { > gotofunction_1(); > $_SESSION['continue'] = "yes") > } > elseif(isset($_SESSION['continue'] ) { > gotofunction_2(); > session_destroy(); > } > > > Am I doing this wrong? Everytime I read another > article on this it just > screws me up even more. > > Any help is truly appreciated. > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com

« previous php.windows (#19419) next »