RE: [PHP] help with explode.....
| From: | Joe Harman | Date: | Fri, 25 Jul 2003 06:06:54 +0000 |
| Subject: | RE: [PHP] help with explode..... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156797@lists.php.net to get a copy of this message | ||
SO COOL...
Thanks too all
-----Original Message-----
From: Binay Agarwal [mailto:binay@m-web.com]
Sent: Thursday, July 24, 2003 1:48 PM
To: Joe Harman
Cc: php-general@lists.php.net
Subject: Re: [PHP] help with explode.....
> Okay... this probably isn't that hard to do... but I am just not sure
> to do it... so i will ask you guys... i amsure someone is going to
> have a one liner for me here!
>
> I am making a survey/poll builder everything is dynamic... there is an
> admin section where the user can make the new survey.. and set certain
> surveys as active.... but this where I am coming into some
> difficulties.... the program builds the form dynamically... all radio
> buttons... when the user submits the form i need to disect each form
> answer and then dump it into MySQL... So I need to know if I can do
> something like use the 'explode()' function no this... and assign them
> to variables... I need to draw out the radio button id and what they
> answered...
I really don know whether i got ur question or not. Probably ur
questions is abt fetching the radio buttons id and their corresponding
values, when a form is submitted . Well if u have large number of radio
buttons then give some common name to all of them. like radbut1,
radbut2, radbut3 and so on................
so u know anything starting from "radbut" is your radio button ..
now use $HTTP_POST_VARS or GET_VARS depending upon ur form method to
retrieve the variables/values pairs. i.e
while(list($key,$value) = each($HTTP_POST_VARS))
{
if (eregi("radbut",$key)) // radio button
// Carry out operations u want
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php