Hey guys really quick question, I have a simple test that I was doing to prove a point and it does not work like I expected but I am not sure why it does not work.
function test(){
echo 'test';
}
if (test()){
echo 'ok';
}
That was my test. ‘ok’ is not echoed and I am not sure why. I was testing this because my real code is calling a class method and is also not working.
if($database->addNewUser($user, md5($pass), $userfile, $email, $age)){
return 0; //New user added succesfully
}
The method addNewUser executes and does what it should, but the return 0; does not. Anyone have any insight into this?
Because your test function is ECHOING not returning..
will echo ‘ok’.
look at $database->addNewUser() – what’s it returning ?