Hello!
Why do I get this error...whats wrong in my code...
it points to line 69...which is
<?php } while ($row_rsHomesDelivery = mysql_fetch_assoc($rsHomesDelivery)); ?>
Any Immediate Help Pls...
Regards,
Sean
<?php require_once('Connections/MyConn.php'); ?>
<?php
include "mysql_data.inc";// MySQL DB connection
include "dropdate.inc"; // Drop date drop down menu library
mysql_select_db(Dietary);
//If the date is there because the SUBMIT button was pushed then print it
//You probably should use $_POST['dropdate'] in the if statment below.
if ($Var_Delivery_Date != "") {
echo "The date returned from the control is: " . $Var_Delivery_Date;
}
echo "<form>\n";
DateDropDown(30,"Var_Delivery_Date");
// echo "<input type=submit>\n";
echo "</form>\n";
//query to get info
$result = mysql_query("SELECT Home_Name FROM homes");
if (!$result) {
echo 'Could not run query: '.$result."\n". mysql_error();
exit;
}
echo '<select name="Var_Home_Name">';
for ($i=0; $row = mysql_fetch_assoc($result); $i++)
{
echo '<option>'.($row["Home_Name"]).'';
}
echo '</select>';
$Var_rsHomesDelivery = "''";
if (isset($POST['Var_Delivery_Date'])) {
$Var_rsHomesDelivery = (get_magic_quotes_gpc()) ? $POST['Var_Delivery_Date'] : addslashes($POST['Var_Delivery_Date']);
}
$Var_rsHomesDelivery = "''";
if (isset($POST['Var_Home_Name'])) {
$Var_rsHomesDelivery = (get_magic_quotes_gpc()) ? $POST['Var_Home_Name'] : addslashes($POST['Var_Home_Name']);
}
mysql_select_db($database_MyConn, $MyConn);
$query_rsHomesDelivery = "SELECT order_main.Order_ID,order_main.Home_Name,order_main.Delivery_Date, order_main.Submission_Name,order_main.Actual_Date,order_transac.Food_ID, order_transac.Qty FROM order_main, order_transac WHERE order_main.Order_ID=order_transac.Order_ID AND order_main.Delivery_Date = 'Var_Delivery_Date' AND order_main.Home_Name = 'Var_Home_Name' ";
$rsHomesDelivery = mysql_query($query_rsHomesDelivery, $MyConn) or die(mysql_error());
$row_rsHomesDelivery = mysql_fetch_assoc($rsHomesDelivery);
$totalRows_rsHomesDelivery = mysql_num_rows($rsHomesDelivery);
mysql_free_result($rsHomesDelivery);
?>
<table border="1">
<tr>
<td>Order_ID</td>
<td>Home_Name</td>
<td>Delivery_Date</td>
<td>Submission_Name</td>
<td>Actual_Date</td>
<td>Food_ID</td>
<td>Qty</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_rsHomesDelivery['Order_ID']; ?></td>
<td><?php echo $row_rsHomesDelivery['Home_Name']; ?></td>
<td><?php echo $row_rsHomesDelivery['Delivery_Date']; ?></td>
<td><?php echo $row_rsHomesDelivery['Submission_Name']; ?></td>
<td><?php echo $row_rsHomesDelivery['Actual_Date']; ?></td>
<td><?php echo $row_rsHomesDelivery['Food_ID']; ?></td>
<td><?php echo $row_rsHomesDelivery['Qty']; ?></td>
</tr>
<?php } while ($row_rsHomesDelivery = mysql_fetch_assoc($rsHomesDelivery)); ?>
</table>