hello.
i have a checkbox like this
and i send the value 1 or 0 into my sql database.
how can i filter the results depending if the box is 0 or 1
i got this code but it doesn't return results when $request='0'
thanks
i have a checkbox like this
Code:
<input name="request" type="checkbox" id="request" value="1" checked="checked" />
how can i filter the results depending if the box is 0 or 1
i got this code but it doesn't return results when $request='0'
Code:
if($type == 'like' && $request='1' && $request='0')
{
$sql = 'SELECT * FROM topic WHERE (test LIKE '."'%$search%') AND request='1'";
}
elseif($type == 'like' && $request='0')
{
$sql = 'SELECT * FROM topic WHERE (test LIKE '."'%$search%') AND request='0'";
}
Comment