RE: Lost session variables still confounding me

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

 



Why not, on page 2:

//Set the session variable, input on Page 1
If ($_POST['ListingName']) {
$_SESSION['f1a'] = $_POST['ListingName'];
}

If there is a POST value, it will be used, else $_SESSION['f1a'] will
keep it's value.

-----Original Message-----
From: Stuart Felenstein [mailto:stuart4m@xxxxxxxxx] 
Sent: donderdag 4 november 2004 11:03
To: Richard Davey; php-general@xxxxxxxxxxxxx
Subject: Re:  Lost session variables still confounding me



--- Richard Davey <rich@xxxxxxxxxxxxxxxx> wrote:

> Unless I'm mistaken - you are redirecting back to
> Page 2 upon an
> error, right? Well according to the code posted, the
> second you hit
> Page 2 again, you are over-writing whatever is in
> the f1a session
> variable with the contents of the $_POST var, which
> naturally will not
> exist, hence you'll blank it out every single time.
> 
Your not mistaken.  That is what's happening.  I just
don't know how to fix it .

Stuart

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

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux