I need to give users access to look up previous sales in a mysql database by PO $ and partnumber. Is there a way to use 2 form type fields to fill in USER INPUT 1 and USER INPUT 2?
PHP:
<?php
$con=mysqli_connect("xxx.xxx.xxx","xxxx","xxxx","xxxx");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT InvoiceNumber, `PO#`, PARTNUMBER from data where `PO#` = 'USER INPUT 1' and PARTNUMBER = 'USER INPUT 2'")or die(mysqli_error($con));
echo "<table border='1'>
<tr>
<th>INVOICE</th>
<th>PO #</th>
<th>PART NUMBER</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['InvoiceNumber'] . "</td>";
echo "<td>" . $row['PO#'] . "</td>";
echo "<td>" . $row['PARTNUMBER'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>