trying to get i form going, so that the user can just a code from a list generated from a database(i got that bit working), and then bring up a new page with the details of that product. i cant seem to get it to send the variable through
here is the page with the list on
<html>
<head>
<title>Gardens 4 U | Purchase</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#container #mainContent h1 {
text-align: center;
}
#container #mainContent form table {
text-align: right;
font-size: 12px;}
-->
</style>
</head>
<body class="thrColFixHdr">
<div id="container">
<div id="header">
<h1> </h1>
</div>
<div id="mainContent">
<h2>Purchase</h2>
<form action="purchaseTwo.php" method="post">
<?php
echo "Product Code: ";
$connect=mysql_connect ('localhost','root','') or die ("could not connect");
mysql_select_db ('gfu',$connect);
$sql = "SELECT DISTINCT Product_Code FROM product_supplier";
$result = mysql_query($sql, $connect) or die("could not run");
echo"<select name = ProductCode>";
while($row=mysql_fetch_object($result))
{
echo "<option value = '".$row->Product_Code."'>$row->Product_Code</option>";
}
echo"</select>";
?>
<input type="Submit" name="continue" value="Next Step ->">
</form>
</div>
<div id="footer">
<p>Privacy | Access | Contact</p>
</div>
</div>
</body>
</html>
the next page i want it to go to
<html>
<head>
<title>Gardens 4 U | Purchase</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#container #mainContent h1 {
text-align: center;
}
#container #mainContent form table {
text-align: right;
font-size: 12px;}
-->
</style>
</head>
<body class="thrColFixHdr">
<div id="container">
<div id="header">
<h1> </h1>
</div>
<div id="mainContent">
<h2>Purchase</h2>
<hr>
<?php
$prodID = $_POST['Product_Code'];
$connect=mysql_connect ('localhost','root','') or die ("could not connect");
mysql_select_db ('gfu',$connect);
$sql="SELECT * FROM product_supplier WHERE product_supplier.Product_Code = '$prodID'";
$result=mysql_query($sql, $connect) or die("Could not run query, please try again.");
while($row=mysql_fetch_object($result))
{
echo "<table>";
echo "<tr>";
echo "<td width='600'>";
echo "Product Code: ";
echo $row->Product_Code;
echo "</td>";
echo "</tr>";
echo "</table>";
}
echo $prodID;
?>
<hr>
</div>
<div id="footer">
<p>Privacy | Access | Contact</p>
</div>
</div>
</body>
</html>