I want to make a page that has a
<input type=text name=search size=30>
now what they type in will query
name ip email
how do I do the search?
select * from profiles where 'name' = $search or 'ip' = $search or 'email' = $search
/Connect to Database/
$numresults=mysql_query("SELECT * FROM profiles WHERE (name LIKE '$search' OR ip LIKE '$search' OR email LIKE '$search') ORDER BY name ASC, ip ASC");
Then you print your results however you would like them to display.
thank you that was very helpful.
What about numresults=mysql_query("SELECT * FROM profiles WHERE (name LIKE '%$search%' OR ip LIKE '%$search%' OR email LIKE '%$search%') ORDER BY name ASC, ip ASC");