I have web form for searching. User enters a last name to search for. The form variable name is name. So, in my code that becomes $name.
If a user searches on smith, I want all names with the letters smith in them to be returned. I.e.,
smith,
smithy,
gold-smith, etc...
In my sql I want to "select * from contacts where last_name like '%smith%'" Of course, I'd use $name in place of "smith"
This should get me any name with ...smith... in it. Right?