little background: currently putting together a website that is selling products, many of which come in various sizes, with respectively different prices. I have the database set up to handle all of this.
However, my issue is thus - how can I go about dynamically changing the product type from dropdown on the product's page, based on the user selecting, display related product from this category on the webpage.
My current code:
However, my issue is thus - how can I go about dynamically changing the product type from dropdown on the product's page, based on the user selecting, display related product from this category on the webpage.
My current code:
Code:
<?php
include('connect-db.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form name="product" method="post" action="">
<table align="center" width="10%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Shoplist</td>
<td>
<select name="shoplist">
<?php
$sql = mysql_query("SELECT art_name FROM category");
while ($row = mysql_fetch_array($sql)){
?>
<option value="shoplist1"><?php echo $row['art_name']; ?></option>
<?php
// close while loop
}
?>
</select>
</td>
<td><input name="go" type="button" value="Go" /></td>
</tr>
</table>
</form>
</body>
</html>
Comment