// if the form wasn't submitted - display the reg form
}
?>
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5799
46391 credits Members referred : 3
« Reply #1 on: Jul 29, 2008, 09:49:25 pm »
Your code looks ok, but maybe it is too much. I mean do you really need to use a recursive function to create an SQL injection safe version of your whole data, instead of cleaning the data that you are using to your queries?
An optimization you can use, is limiting the mysql results where possible. For instance this:
$query = "SELECT username FROM Members WHERE username='$username'";?>
could be :
$query = "SELECT username FROM Members WHERE username='$username' LIMIT 1";?>