Hi,
I am passing a variable from another page to this one and I made a check to see which variable was used. I get no errors whenever any of the three variables are ints, but when the $quotename is tested with a string like "scott" it errors out and says:
Supplied argument is not a valid MySQL result resource
The URL looks like:
quotelookup.php?quotename=scott
Here is what the code looks like:
if($quotenum){
$ConfigQuery="SELECT * FROM config WHERE quotenumber=$quotenum";}
if($quotename){
$ConfigQuery="SELECT * FROM config WHERE name=$quotename";}
if($quotephone){
$ConfigQuery="SELECT * FROM config WHERE phone=$quotephone";}
$configdbResult=mysql_query("$ConfigQuery", $dbLink);
$numfields=mysql_num_fields($configdbResult);
$numrows=mysql_num_rows($configdbResult);