This is my solution, but Iam getting some errors and the output is not the same as required. Can anyone please help me:
<?php
$sql=mysqli_connect("localhost","root","","a");
$show= "SELECT Item_name , Quantity ,Order_Date FROM order_items JOIN orders ON order_items.Order_Id=orders.Order_Id WHERE orders.Order_Id='".$_POST['num']."'";
$showq=mysqli_query($sql,$show);
$dateq=mysqli_query($sql,$show);
?>
<html>
<head>
</head>
<body>
<form action="three.php" method="POST">
<p>
<lable>Enter Order number:</lable>
<input type="text" name="num">
</p>
<input type="submit" name="submit">
</form>
<p>Order Number:<?php print $_POST['num']?></p>
<p>Order_date:<?php $date = mysqli_fetch_array($dateq,MYSQL_ASSOC);
print $date['Order_Date']; ?></p>
<table cellpadding="2" border="4">
<?php
if($showq){
while($info = mysqli_fetch_array($showq,MYSQL_ASSOC)){
echo'<tr>';
echo'<td>';
echo $info['Item_name'];
echo'</td>';
echo'<td>';
echo $info['Quantity'];
echo'</td>';
echo '</tr>';
}
}
?>
</table>
</body>
</html>