Originally Posted by Dan
It's just a bunch of if statements.
Run them through your head with: ($user = "username") || ($user = null)
I cannot create variables that can be used outside of the function from the function? Like:
function username($user) {
if($user = null)
$deleted = "deleted";
}
Then when the function is called username($username); I can echo $deleted? Is something like this at all possible? My tests show the above wouldn't work.
|
http://php.net/manual/en/language.variables.scope.php
You could declare $deleted outside the function and then get access to it inside a function with the global keyword.
Not that I'm saying that's a good idea or anything.