** solved ***Search using selection items
Posted: Mon Nov 28, 2005 1:13 pm
Hi,
I am trying to carry out a search using selection items put into an array. I am not sure that this is the best way to do this, however I think it could work.
I have the following code;
Please help.
I am trying to carry out a search using selection items put into an array. I am not sure that this is the best way to do this, however I think it could work.
I have the following code;
Code: Select all
$array [0]= $location;
$array [1]=$bedrooms;
$array [2]=$type;
$array [3]=$price;
echo $array[0];
// Query database with search variables
$result = mysql_query("SELECT * FROM homes WHERE location LIKE '%$array[0]%'");