shawnlearn
asked on
In php, I have four radio button and their values comes from while loop data comes from DB.I need add radio button's onclick one drop menu .
In php, I have four radio button and their values comes from while loop data comes from DB.I need add radio button's onclick drop menu and drop down menu will change onclick radio button action .
you need onChange="someaction();"
ASKER
<?php
$sqls = "SELECT * FROM `option_contents` WHERE `optiontype` = '1' AND `option_name_id` = '3'";
$runquery = mysql_query($sqls,$con);
while($data = mysql_fetch_assoc($runquer y))
{
?>
<input type="radio" name="Sauce3" value="<?php echo $data['value']; ?>" onchange="showStuff('answe r1'); return false;">
<span><?php echo $data['value']; ?> </span><br/>
<div id="answer1" style="display: none; margin-left:25px;">
<select name="HDSIZE">
<option selected="" value="500GBSATAHD">500 GB 7200 RPM SATA hard drive (+$0/month)</option>
<option value="1000GBSATAHD">1TB 7200 RPM SATA hard drive (+$20/month)</option>
<option value="2000GBSATA">2 TB SATA (5,900 rpm) (+$40/month)</option>
</select>
</div>
<?php
}
?>
This is my code. How is it mange or call i function . nOw i used static drop menu for testing after code working i will add dynamic code will use. Tell me how i do ?
$sqls = "SELECT * FROM `option_contents` WHERE `optiontype` = '1' AND `option_name_id` = '3'";
$runquery = mysql_query($sqls,$con);
while($data = mysql_fetch_assoc($runquer
{
?>
<input type="radio" name="Sauce3" value="<?php echo $data['value']; ?>" onchange="showStuff('answe
<span><?php echo $data['value']; ?> </span><br/>
<div id="answer1" style="display: none; margin-left:25px;">
<select name="HDSIZE">
<option selected="" value="500GBSATAHD">500 GB 7200 RPM SATA hard drive (+$0/month)</option>
<option value="1000GBSATAHD">1TB 7200 RPM SATA hard drive (+$20/month)</option>
<option value="2000GBSATA">2 TB SATA (5,900 rpm) (+$40/month)</option>
</select>
</div>
<?php
}
?>
This is my code. How is it mange or call i function . nOw i used static drop menu for testing after code working i will add dynamic code will use. Tell me how i do ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for your help.