I realise this is probably an absolutely horrible way to do a query, and of course its not working. The point of it is to select users based on a date range and a keyword.
$query = mysql_query("SELECT * FROM my_users WHERE my_regdate BETWEEN '$ftimestamp' AND '$ttimestamp' AND my_username LIKE '%$trimmed%' OR my_realname LIKE '%$trimmed%' OR my_email LIKE '%$trimmed%' ORDER BY my_id");
You are missing the brackets in the query