http://htmlweb.ru/ajax/example/search.php did everything exactly as on the site. How to make it look for by name and surname? I did something similar, but so far I’m looking only for OR by name OR only by last name I need to search by name and last name at the same time (Vasya Pupkin and Pupkin Vasya) here are my sketches:
<? include('auth/bd.php'); $searchq = $_GET['name']; $getName = mysql_query('SELECT * FROM users WHERE firstname LIKE "%'.addslashes($searchq).'%" OR lastname LIKE "%'.addslashes($searchq).'%"'); if(!empty($searchq)) while ($row = mysql_fetch_array($getName)) echo $row['firstname']." ".$row['lastname'] . '<br/>'; ?>
ORReplace withAND. - Visman