I’ve got 2 varchar columns, one for the first name, and one for last name.
I’m trying to create a search box where the user will either type the first name or last name of a person, and it would search accordingly and show results. I.e he could either put in ‘john’ or ‘john smith’.
How can I achieve this? Is there a foolproof way to seperate the first and last name from the user typed data (i.e, what if he typed Anne Marie Smith, which would I use as the first name and which as the last?).
here
$token = $_GET['token'];i.e whatever user type in the search box you can get by using ajax .