Yeah I put the "%$location%" but it dosent still dosent working. I am using "musql" database.. my code is as follows..
I have put the * where it's giving error.
<?php
if ($course)
{
$sa .= "course like '%$course%' and ";
}
if ($level)
{
$sa .= "level like '%$level%' and ";
}
if ($location)
{
$count=count($location);
for ($i=0; $i<$count; $i++)
{
$sa .=" location like '%location%'";
}
}
$db=mysql_pconnect("localhost") or die("Could not connect to the DB");
mysql_select_db("study",$db) or die("Could not select to the DB");
$sql1 = "select from fetchuniversity where $sa";
$result1=mysql_query($sql1);
error* $row=mysql_fetch_object($result1);
while ($row)
{
echo ("your search result is as follows <br>");
echo (" $row->name, $row->course, $row->level, $row->location, $row->url ");
}
?>