[PHP] Re: $_POST variable

2011-03-11 Thread Geoff Lane
Hi Danny, On Friday, March 11, 2011, 7:28:10 PM, you wrote: I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio name=?php print

[PHP] Re: $_POST variable

2011-03-11 Thread Shawn McKenzie
On 03/11/2011 01:28 PM, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio name=?php print (radio_.$result_from_mysql) ; ?

Re: [PHP] Re: $_POST variable

2011-03-11 Thread richard gray
You could use foreach to iterate through the post variables until you encounter a match: foreach ($_POST as $key = $value){ if (substr($key, 0, 6) == radio_) { $buttonName = $key; $buttonValue = 4value; break 2; } } I haven't tried the above code, but I hope

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Jim Lucas
On 3/11/2011 12:03 PM, Shawn McKenzie wrote: On 03/11/2011 01:28 PM, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Shawn McKenzie
On 03/11/2011 02:33 PM, Jim Lucas wrote: On 3/11/2011 12:03 PM, Shawn McKenzie wrote: On 03/11/2011 01:28 PM, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Kirk Bailey
On 3/11/2011 2:43 PM, Geoff Lane wrote: [snip] You could use foreach to iterate through the post variables until you encounter a match: foreach ($_POST as $key = $value){ if (substr($key, 0, 6) == radio_) { $buttonName = $key; $buttonValue = 4value; break 2;

[PHP] Re: $_POST[$variable]

2003-12-11 Thread Mike
If you change the name of the data field to something[] then the $_POST['something'] will be an array containing your data The code you have will result in 2 fields (one hidden one normal) with the same name ($i), this will cause lots of problems It is not a good idea to give form fields

[PHP] Re: $_POST[$variable]

2003-12-11 Thread Christian Jancso
thx Mike that works :-) thx also to the others for their help :-)) Christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php