how multiple search in single input
Posted: Thu Aug 16, 2007 2:52 pm
Hi All...
how searching by name or email or no telp in single input (box) ??
its code my html form
i use php code like this :
that code above no have result, and i try like below this have same result :
im try too using OR but result have same
please help me the solotion
how searching by name or email or no telp in single input (box) ??
its code my html form
Code: Select all
<form action="result.php" method="POST">
<input type="text" name="find" >
<input type="submit" name="search" value="search" >
</form>i use php code like this :
Code: Select all
$find = $_POST["find"]; // from name input type in form
$query = "SELECT * FROM register WHERE name_child AND email AND nohp LIKE '%$find%' ORDER BY name_child ASC";
$NumResult = mysql_query($query);
$result = mysql_numrows($NumResult);Code: Select all
$query = "SELECT * FROM register WHERE name_child LIKE '%$find%' AND email LIKE '%$find%' AND nohp LIKE '%$find%' ORDER BY name_child ASC";
$NumResult = mysql_query($query);
$result = mysql_numrows($NumResult);please help me the solotion