RE: [PHP] Data trasfer between PHP pages

From: Date: Mon, 12 Jan 2009 17:03:43 +0000
Subject: RE: [PHP] Data trasfer between PHP pages
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-286106@lists.php.net to get a copy of this message
> -----Original Message----- > From: Chris Carter [mailto:chandan9sharma@yahoo.com] > Sent: Monday, January 12, 2009 11:00 AM > To: php-general@lists.php.net > Subject: [PHP] Data trasfer between PHP pages > > > Hi, > > I have one form where user fills data using radio buttons. Only one > answer > goes from here to another page. > > FORM 1 > > <form action="form2.php" method="post"> > <input type="radio" name="myname" value="Answer 5" > id="1" /> > <label for="1">5</label> > <br /> > <input type="radio" name="myname" value="Answer 1" > id="2" /> > <label for="2">1</label> > <br /> > <input type="radio" name="myname" value="Answer 3" > id="3" /> > <label for="3">3</label> > <br /> > <input type="submit" value="Enter" /> > </form> > > --------------------------- > > FORM 2 > > There is another page has a form with 14 fields PLUS I need the data of > the > previous form to be hidden somewhere in this form. > > Once this form is submitted I need to put the combined data into the > database. > > I know this is so simple. But not sure why this is not working. I tried > to > use <?$_GET[myname] ?> from the first form but its not working. > > My module page has to go live tomorrow morning, I am stuck, please > help. $_GET['var'] is used for GET-method data retrieval. You have specified POST-method data in your form. Try $_POST['myname'] and see if that doesn't grab the value you're looking for. HTH, // Todd

« previous php.general (#286106) next »