Actually... That didn't work... The QuestionID and AnswerID are
different from poll to poll.... Can I do something like a loop and pass
the QuestionID and AnswerID into other variables...

Ex. Here is my HTML that is dynamically created....
*****************************
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form action="play.php" method="post" name="Poll" id="Poll">
<p>The Cool Joe Survey</p>
<p>What color are you eyes?<br>
<blockquote>
        <input type=radio name=9 value=5>Blue<br>
        <input type=radio name=9 value=7>Green<br>
</blockquote></p>
<p>What Letter does your name start with<br>
<blockquote>
        <input type=radio name=14 value=19>a<br>
        <input type=radio name=14 value=20>b<br>
        <input type=radio name=14 value=21>c<br>
</blockquote></p>
<p>What Day is it<br><blockquote>
        <input type=radio name=13 value=17>Thurs<br>
        <input type=radio name=13 value=18>Fri<br>
        <input type=radio name=13 value=16>Tues<br>
</blockquote></p>
  <p align="center">
        <input name="GoForm" type="hidden" id="GoForm" value="1">
        <input type="submit" name="Submit" value="Submit Survey">
</p>
</form>
</body>
</html>

Can I do something like this on the nest page
*****************************

1 Start the do statement til radio button name equals null
2 extract (from $_POST) the radio button name and plug it into
$RadioName
3 extract (from $_POST) the radio button value and plug it into
$RadioValue
4 insert it into a MySQL table
5 while statement sends you back to 1
        * not exactly sure how I am going to do the while part

LOL

Thanks,
Joe

-----Original Message-----
From: Shaunak Kashyap [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 25, 2003 1:14 AM
To: Joe Harman
Subject: Re: help with explode.....


> The name of the set of radio buttons is the QuestionID (so it's a 
> number)... And the options are the AnswerID (they are also numbers)...
>
In that case, I assume your code looks something like this:

<input type="radio" name="<?=$QuestionID?>">...

How about using an array instead of just the QuestionID as shown below:

<input type="radio" name="Question[<?=$QuestionID?>">...

That way, on the next page (the one to which this form is being
submitted) you can get the AnswerIDs by simply looping through the
$_POST["Question"] array (assuming your form submission method is post).

Hope that made sense.

Shaunak




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to