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

From: Date: Fri, 08 Oct 2004 17:32:21 +0000
Subject: RE: [PHP-DB] Help: First Time Form with Sessions
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-36695@lists.php.net to get a copy of this message
Figured it out. Page 2 had to have the field name in the $SESSION parameters, not the holder from the Page1 array register. Stuart --- Stuart Felenstein <stuart4m@yahoo.com> wrote: > Well I guess too much success at once is a bad > thing. > > For some unapparent reason, the variables here are > not > carrying over. Anyone see anything wrong here ? > > Page1 (Somewhat snipped) > > <?php > session_start(); > > if ( empty( $_SESSION['l_education'] ) ) { > $_SESSION['l_education']=array(); > } > > if ( is_array( $_REQUEST['LurkerEdu'] ) ) { > $_SESSION['l_education'] = array_unique( > array_merge( $_SESSION['l_education'], > $_REQUEST['LurkerEdu'] ) > ); > } > ?> > <td width="387"><select name="LurkerEdu[]" > multiple="multiple" size="3"> > > Page 2: > > <?php > session_start(); > ?> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 > Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > <html> > <head> > <title>Untitled Document</title> > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1"> > </head> > <?php > if ( is_array( $_SESSION['l_education'] ) ) { > print "<b>Your cart:</b><ol>\n"; > foreach ( $_SESSION['l_education'] as $p1 ) { > print "<li>$p1</li>"; > } > print "</ol>"; > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.db (#36695) next »