Hi,
I am trying to send a variable for a MySQL query from a form using a list menu. I have tested the queries directly in MySQL and they work fine, but when I send them from the form it doesnt work. I am thinking maybe there is an error in my syntax. Any help would be greatly appreciated.
Here is a code sample for the sql query:
$sql = "select $table1.quote, $table1.date, $table1.customer, $table1.value, $table1.quoted, $table1.last_review, $table1.status
from $table1, $table2
where find_in_set($table1.territory,$table2.territory)>0 and $table2.login =\"$login\" $condition"
;
Here is a code sample for the form (note the form reloads the page):
<form method="post" action="listquote.php">
<select name="condition">
<option value="">All quotes</option>
<option value="and $table1.status=\"pending\"">All quotes
pending</option>
</select>
<input type="submit" name="Submit" value="Go!">
</form>
Any ideas would be greatly appreciated.
Many thanks
Clive