[Solved] Passing 2 arguments in URL help
Posted: Mon Jul 16, 2007 8:45 am
Hi,
I’m not sure how to pass two arguments to my query using the following:
And this is where I’m passing this to but I’m getting and error.
Can anyone tell/show me what I need to do?
Thanks
B
I’m not sure how to pass two arguments to my query using the following:
Code: Select all
<a href="paybycheque.php?order_ID=<?php echo($row_rsCWOrder["order_ID"]);?>&cst_ID=<?php echo($row_rsCWOrder["order_CustomerID"]);?>">Change</a>Can anyone tell/show me what I need to do?
Thanks
B
Code: Select all
<?php
$colname_GetCustomer = "1";
if (isset($_GET['cst_ID'])) {
$colname_GetCustomer = (get_magic_quotes_gpc()) ? $_GET['cst_ID'] : addslashes($_GET['cst_ID']);
}
mysql_select_db($database_*****, $*****);
$query_GetCustomer = sprintf("SELECT * FROM tbl_customers, tbl_orders
WHERE order_ID = '%s'
AND cst_ID = '%s'", $colname_GetCustomer);
$GetCustomer = mysql_query($query_GetCustomer, $batchelors) or die(mysql_error());
$row_GetCustomer = mysql_fetch_assoc($GetCustomer);
$totalRows_GetCustomer = mysql_num_rows($GetCustomer);
?>