View Full Version : help,i'm lost

09-06-2005, 04:35 AM
i've got this web page which can search by one category, but i need it to search by at 3, there are 3 text fields taking info and a submit button, results must be shown on the same page help

09-07-2005, 05:40 AM
In the script, after you clean/slash the form variables, edit the query so it has something like the following in it:

SELECT var1,var2,var3 FROM table WHERE var1 LIKE '%$var1%' OR var2 LIKE '%$var2%' OR var3 LIKE '%$var3%'

Then in the mysql_fetch_array part of the code, edit it for the new variables. There are some examples here (http://www.php.net/manual/en/function.mysql-fetch-array.php).

09-25-2005, 09:13 PM
TIP: avoid using mysql_fetch_array.. it is slower than both mysql_fetch_row & mysql_fetch_assoc