Code: Select all
$w=$_GET['group'];
$sg=$_GET['gname'];
foreach($sg as $k => $v)
{
$sq="select * from $w where subg like %$v%";
echo $sq;//line 4
$res=mysql_query($sq) or die("Error in selection of sub group ". mysql_error());
print_r($res); //line6
echo "<br>";
}