RE: [PHP] Two little questions

2001-01-14 Thread mOrP
James, > function CUP ( > if ((!$alias) || (!$password)) { > header("Location: login.php"); > exit; > } > ); > usually a function has the following structure: function ( ) { } of course you can put any whitspace inside: function ( ) { } which makes it

Re: [PHP] Two little questions

2001-01-14 Thread James, Yz
> Then you must 'get' the global variables (like $name): > > $name = "mOrP"; > > function print_name() > { > global $name; > echo $name; > } > > print_name(); > > > But it's better to work with the function arguments: > > $name = "mOrP" > > function print_name($name_arg) > { > echo $name_arg; > }

RE: [PHP] Two little questions

2001-01-14 Thread mOrP
> function check_alias_password() > global $alias, $password; better: global $alias; global $password; > { > if ((!$alias) || (!$password)) { > header("Location: login.php"); > exit; > } > } > > check_alias_password(); > > wor