I have a link in a table which sends two $_GET variables to another page with the following code:
echo "<td><a href='somepage.php?del_date=" . $row['del_date'] . "&order_no=" . $row['order_no'] . "'>Details</a></td>";
This seems to have worked as I am able to echo both of these on the other page. However I am not sure of the syntax needed to put both of them into a mysql_query. I have at the moment something like:
$result = mysql_query("SELECT panel_product_no, del_quantity
FROM deliveryContainsPanelProduct
WHERE del_date = " . $_GET["del_date"]
AND order_no = " . $_GET["order_no"]);
But that doesn't work. I've tried a bunch of variations by playing with the inverted commas etc, but most of the time the page is blank or at best it displays the table headings but doesn't output any results. I think the problem is somewhere between the WHERE and the AND clause but I'm completely stuck.
Can anybody help me out?