Question
Trying to pass variable to include file
I have a page that is called by using $_GET[cust_name]
It brings up info for the customer, name address, etc.
I have included a file "quotes.php" by <?php include "quotes.php";?>
Where I have an SQL statement:
$query_quotes = "SELECT * FROM quotes LEFT JOIN customer ON quotes.cust_id = customer.cust_id WHERE cust_business_name = '$_GET[cust_name]'";
$quotes = mysql_query($query_limit_quotes, $db) or die(mysql_error());
$row_quotes = mysql_fetch_assoc($quotes);
$totalRows_quotes = mysql_num_rows($quotes);
All it returns is Query is Empty.
Now I tried using sessions and the same thing happens.
How can I fix this?
I have comments system very much like this but it is called by a variable thru the URL, It should work this way.
It brings up info for the customer, name address, etc.
I have included a file "quotes.php" by <?php include "quotes.php";?>
Where I have an SQL statement:
$query_quotes = "SELECT * FROM quotes LEFT JOIN customer ON quotes.cust_id = customer.cust_id WHERE cust_business_name = '$_GET[cust_name]'";
$quotes = mysql_query($query_limit_quotes, $db) or die(mysql_error());
$row_quotes = mysql_fetch_assoc($quotes);
$totalRows_quotes = mysql_num_rows($quotes);
All it returns is Query is Empty.
Now I tried using sessions and the same thing happens.
How can I fix this?
I have comments system very much like this but it is called by a variable thru the URL, It should work this way.
