$mainuser=$_POST['mainuser'];
$likeduser=$_POST['likeduser'];
$workcode=$_POST['workcode'];
$sqlQ="select * from shablike where 'mainuser'='$mainuser' and 'workcode'='$workcode' ";
$result=mysql_Query($sqlQ);
if($result){
print "again";
}
else {
$sqlQ1="insert into shablike (workcode,mainuser,likeduser) VALUES('$workcode','$mainuser','$likeduser')";
$result1=mysql_Query($sqlQ1);
if($result1)
{print "ok";}
}
mysql_close($con);
?>
this is my simple code but it dosnt work.i want to select row where mainuser=$ mainuser and workcode=$workcode
plz help me thank for all