Re: Data trasfer between PHP pages

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

 



On Mon, 2009-01-12 at 13:40 -0500, Robert Cummings wrote:
> On Mon, 2009-01-12 at 13:37 -0500, tedd wrote:
> > At 8:59 AM -0800 1/12/09, Chris Carter wrote:
> > >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.
> > >
> > >Thanks,
> > >
> > >Chris
> > 
> > 
> > Arrgggg.....
> > 
> > Sometimes I wonder.
> 
> Sometimes it's the little things and a fresh pair of eyes make all the
> difference.
> 
> Cheers,
> Rob.
> -- 
> http://www.interjinn.com
> Application and Templating Framework for PHP
> 
> 
I tend to use $_REQUEST to capture a lot of my data, as I end up mixing
get and post a lot throughout my code. $_REQUEST is an amalgamate of
$_COOKIE, $_GET and $_POST (in that order I believe, with $_GET
overwritting $_COOKIE, and $_POST overwriting $_GET). This is especially
useful when altering how a form sends data. Only today we had to update
a form to use GET instead of POST, as IE managed to break the back
button because of the POST values not auto-submitting. It would have
meant a lot of code changes had $_REQUEST not been used.


Ash
www.ashleysheridan.co.uk


-- 
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