RE: [PHP] Returning values from functions

2003-07-09 Thread Jennifer Goodie
> function auth_user($logged_in) { > if (isset($logged_in)) { > list($s_username, $hash) = explode(',',$logged_in); > global $secret_word; > if (md5($s_username.$secret_word) == $hash) { > $username = $s_username; > return $username; > } else { > die ("You have t

Re: [PHP] Returning values from functions

2003-07-09 Thread Jason Giangrande
Thanks. I'm new to PHP, but still I should have seen that. :-) Jason On Wed, 2003-07-09 at 18:44, David Nicholson wrote: > Hello, > > > This is a reply to an e-mail that you wrote on Wed, 9 Jul 2003 at 23:40, > lines prefixed by '>' were originally written by you. > > auth_user($_SESSION['logi

Re: [PHP] Returning values from functions

2003-07-09 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Wed, 9 Jul 2003 at 23:40, lines prefixed by '>' were originally written by you. > auth_user($_SESSION['login']); > var_dump($username); You are not collecting the value that your function returns. Try: $username = auth_user($_SESSION['login']