Hi Friends,
My code i am given in below and i want to pass the radio button value in the href link.how can i pass the radio button value also in that href link? I will be grateful if anyone can help me in this regard.
$sql = "SELECT * FROM book";
$result = mysql_query($sql);
while(list($id, $name) = mysql_fetch_row($result)) {
echo "<tr>";
echo "<td>$name</td>";
echo "<td><input type='radio' name='$name' value='amt_1yr'/>1 Year
<input type='radio' name='$name' value='amt_2yr'/>2 Year</td>" ;
echo "<td><a href=\"cart.php?action=add&id=$id&MYRADIOVALUE=CHECKED RADIO VALUE\">Add To Cart</a></td>";
echo "</tr>"; } ?>
</table>
Thanks in advance..
How can i pass the radio button values in the url
Moderator: General Moderators
-
flaviodizuza
- Forum Newbie
- Posts: 1
- Joined: Sat Oct 29, 2011 4:46 am
Re: How can i pass the radio button values in the url
If you want to do it without a page reload, you'll need to use Javascript.