RE: Help: First Time Form with Sessions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, right before you answered this I found out about
the first line of code by googling. My apologies.

Stuart
--- "Murray @ PlanetThoughtful"
<lists@xxxxxxxxxxxxxxxxxxxx> wrote:

> Hi Stuart,
> 
> session_start() has to be the first actual codeline
> in your page.
> 
> So:
> 
> <?
> 	session_start()
> 	/* rest of code */
> ?>
> <html>
> 
> Etc...
> 
> On the page  you're receiving the error on, move
> "session_start()" to the
> first line executed in the script.
> 
> Much warmth,
> 
> Murray
> http://www.planetthoughtful.org
> Building a thoughtful planet,
> One quirky comment at a time.
> 
> 
> -----Original Message-----
> From: Stuart Felenstein [mailto:stuart4m@xxxxxxxxx] 
> Sent: Saturday, 9 October 2004 1:57 AM
> To: Bastien Koert; php-db@xxxxxxxxxxxxx
> Subject: RE:  Help: First Time Form with
> Sessions
> 
> See interspersed:
> --- Bastien Koert <bastien_k@xxxxxxxxxxx> 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 ?
> 
> 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
> 
> 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.
> 
> Stuart
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux