Hi, I have a form with two fields on it where the second is optional. I am using the following to produce results:
$result = mysql_query("select * from table where field1 like '$field1' and field2 like '$field2%'");
However it only works when data is input into both fields. I know why I am going wrong (AND) but can't get my head round the correct way of doing it.
Please help!!!
Thanks