|
|
 |
RE: FN-FORUM PHP Switch
date posted 10th September 2002 17:57
Put quotes around login and logout - PHP thinks you have defined 2 constants
with those names.
i.e.
switch ($action) {
case 'login':
...
case 'logout':
...
}
BTW I think this list is plain text messages only - HTML posts will get you
some verbal... :)
Cheers
Rich
-----Original Message-----
From: [EMAIL REMOVED]
[EMAIL REMOVED] Behalf Of Darren - Javelin
Designs
Sent: 10 September 2002 17:11
To: [EMAIL REMOVED]
Subject: FN-FORUM PHP Switch
Hi could some one tell me what is wrong with this switch coz it keeps
brining this error back a Notice: Use of undefined constant login - assumed
'login' in C:wwwrootpplogin.php on line 15
switch ($action) {
case login:
process_login();
die();
case logout:
//null out cookies at start of login routine
// note on using cookies.
// MUST BE SET before ANY http output.
// They TRAVEL in the http HEADER so have to go first.
setcookie ("ck_username", "");
setcookie("ck_password", "");
setcookie("ck_user_id", "");
die();
}
|
 |
|