[PHP] Two little questions

2001-01-14 Thread James, Yz
OK, this will be laughably easy for you guys. I want to write a function (until now, I have been heavily repeating code, but it's time to trim everything down.) The function basically needs to check that username and password have been entered, and then check them against mysql data. All I am

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 name ( arguments ) { code } of course you can put any whitspace inside: function name ( arguments ) {

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(); work? Or would