Can you be more specific with what's not working? Errors, blank page, different output from what you expected...?
When you're debugging queries, the two best ways I've found to debug are to print out the query string (to see exactly what you're sending the db) and to use mysql_error().
Replace the relevant portions of your code with this:
$strSQL = "SELECT * FROM persons WHERE name, gender LIKE '%$keywords%'";
$result = mysql_query($strSQL) or die('Query String: ' . $strSQL . '<br />' . mysql_error());
Your code is also vulnerable to SQL Injection - be sure to use something like mysql_real_escape_string()