I have a drop-down list box thats echo product sizes. I would like the price variable depending on the choosen product size within the list box to change without refreshing the page.
How would go about doing something like that, I was told by someone the only way of doing something like thats is throught javascript. Is that true ? or can it be done in php because I have idea when it comes to javascript.
Or alternatively have the page refresh, when the user clicks on a particular size in the drop-down box echo ing the correct price
your help is much appreciated, and thanks in advance
<?php
$query = "SELECT products.prod_id, products.name, fprice.frmCode, fprice.frmPrice, fprice.frmSize FROM products INNER JOIN fprice ON products.code = fprice.frmCode AND products.prod_id = '$prodid'";
$results = mysql_query($query)
or die(mysql_error());
if ($query)
{
echo "<select name='frmPrice'>";
while ($row = mysql_fetch_array($results))
{
// .$row['frmSize'] = the sizes of the product
$price = $row['frmPrice'];
echo "$price";
echo "<OPTION VALUE=\"".$row["frmID"]."\">".$row["frmSize"]." </OPTION> ";
}
echo "</select>";
}
?>
</td>
<td width="22%"></td>
<td width="22%"><?php echo $price; ?></td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="4">quantity</td>
</tr>
