Does the function add_new_user
run the SQL INSERT query if it is inside the if clause?
I have the functions
function add_new_user ( $username, $email, $passhash_md5 )
{
-- cut: database INSERT queries
return 1;
}
I use the code above as
if ( validate( $username, $password, $email ) == 1 ) {
if ( add_new_user ( $username, $email, $passhash_md5 ) == 1 ) {
// problem here
-- cut
}
}
I asked this question because I am not sure why this handler always gives unsuccessful registraton notice. The two codes belong to the handler. The bug seems to be in the syntax of my code and perhaps in the use of if/else.