Re: Forms and PHP

From: Date: Mon, 16 Apr 2001 03:13:48 +0000
Subject: Re: Forms and PHP
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-8586@lists.php.net to get a copy of this message
In article <005201c0c61d$bd2bf620$97fe013d@piii500>, ckra@vsnl.net ("CK Raju") wrote: > I am unsuccessful in attempting to have the FORM work with POST method, while > there is a <select> with <option> alongwith other variables that I am > accepting directly from text fields. > > Its something like this > <form action=analyse.php method=post> > <select name=xxxx> > <?php > / / I try to populate from a table in MySQL (which works)-- > / / like this, which is in a loop--getting tableid and tablefield > <option value=$tableid>$tablefield</option> > ?> > </select> > My problem starts here when I accept other variables before posting the form > contents. > > eg: > > <input name=xxx type=text> > > > > > <input type="submit" name="submit" value="Proceed"> > </form> > > In my analyse.php, when I try to list out the various variables posted from > here, it doesn't show up. I even tried adding all the variables as input > type=hidden before submitting the form, but it still doesn't show up. > > When there is no <select> </select> section, the whole variables show up. > > Where could I be wrong ? In your real code, are the quotation marks missing from your input, select, and option tags? It may help to submit the script output (IOW, the HTML as the browser sees it) to an HTML validator. Other than that, it might help to show what code you're using to check that the variables have been passed. Perhaps the problem lies somewhere in the "receiving" script instead of the posting one...? -- CC

« previous php.db (#8586) next »