?php
$Onum=$_POST{'Onum'};
$connect = mysql_connect("localhost","root","") or die("ok");
mysql_select_db("dbmsproj") or die ("Database not found");
$query = "SELECT `ITEM-NO` FROM `made-of` WHERE 'ORDER-NO' = '$Onum";
$results = mysql_query($query);
echo "<table>";
while($row = mysql_fetch_array($results)) {
?>
<tr>
<td><?php echo $row['ITEM-NO']?></td>
</tr>
<?php
}
echo "</table>";
?>
I have a table with 3 columns ITEM-NO, ORDER-NO, and ORDER-QUANTITY. I want to display the item no of a specific order no. All I am getting is a blank page.
The code bellow is the html form.
<div>
<form action="query1.php" method="post">
<h3>Find Items in an Order</h3>
<label for="Onum">Enter Order Number</label>
<input type="Number" id="Onum" name="Onum" required>
<button type="Submit">Submit</button>
</form>
</div>