> -----Original Message----- > From: Nova [mailto:[EMAIL PROTECTED]] > Sent: 12 January 2003 20:04 > > This statement doesnt look right to me. > > if(isset($_POST['userid']) && isset($_POST['pword'])){ > $_SESSION['user'] = $_POST['userid']; > $_SESSION['password'] = $_POST['pword']; > }
Nowt wong wi' that! > > the if should be: > > if ((statement)&&(statement)) That's not true! The syntax of "if" is: if (expression) statement; and one possible expression is: expression && expression so this is a valid if condition: if (expression && expression) Now, you *may* need additional parentheses around the expressions if they contain lower-priority operators than &&, but they are not required. Also: a statement is *not* an expression, so the if condition can never include statements! Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php