RE: [PHP-DB] Help: First Time Form with Sessions

From: Date: Fri, 08 Oct 2004 16:11:20 +0000
Subject: RE: [PHP-DB] Help: First Time Form with Sessions
Groups: php.db 
Request: Send a blank email to php-db+get-36692@lists.php.net to get a copy of this message
see interspered again ;)
From: Stuart Felenstein <stuart4m@yahoo.com> To: Bastien Koert <bastien_k@hotmail.com>, php-db@lists.php.net Subject: RE: [PHP-DB] Help: First Time Form with Sessions Date: Fri, 8 Oct 2004 08:56:48 -0700 (PDT) See interspersed: --- Bastien Koert <bastien_k@hotmail.com> wrote: Hi Stu 1. why not check it on every page, then if it fails the user won't need to make it to the end and then have to go back to the beginning to fix something minor. 2. You could use hidden fields to pass the data back and for or just use a session, otherwise the variables expire on that page I think I'm stuck on sessions now :) . So if there were 3 pages and then a final 4th page where the transactions to the database take place - without passing the session variables around , they will still be available on the 4th page ?
yes, you will have them available...to add new elements to the session, you will need to put session-start(); on each page THAT REQUIRES sessions
3 - Now I've run into an error: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/lurkkcom/public_html/Multi2Return.php:2) in /home/lurkkcom/public_html/Multi2Return.php on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/lurkkcom/public_html/Multi2Return.php:2) in /home/lurkkcom/public_html/Multi2Return.php on line 3
You have some additional output here...could be a blank line, a cookie or html output to the browser...CAN COME from an INCLUDE file, check it out...
On first page: I have session_start(); And on "Multi2Return.php" I have session_start(); I thought to continue session you need to put the session_start function on each page. If I remove though , I get nothing.
Yes, you do need it on each page that uses session variables
Stuart -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ Take charge with a pop-up guard built on patented Microsoft® SmartScreen Technology. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*.

« previous php.db (#36692) next »