View Single Post
Old 10-21-2012, 09:22 AM  
Ketchup
Confirmed User
 
Ketchup's Avatar
 
Join Date: Jul 2006
Location: Toronto Canada
Posts: 563
coding search form question

I have a search form that when people type in the exact name of the user it shows results but if they don't add a space inbetween first and last names or they do and that is not the name it won't show results.

Such as John Doe shows results but not Johndoe

Can I change this code below to show results for johndoe as well?

Code:
if(isset($_POST['search']))
{
    $searchs = array();
    if(!empty($_POST['contactname']))
    {
        $searchs[]="contactname LIKE '%".$_POST['contactname']."%'";
    }

Last edited by Ketchup; 10-21-2012 at 09:26 AM..
Ketchup is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook