Re: password-protecting with PHP, help plz
| From: | Chris Dowell | Date: | Tue, 21 Sep 2004 18:50:21 +0000 |
| Subject: | Re: password-protecting with PHP, help plz | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-197455@lists.php.net to get a copy of this message | ||
And after that - go and try to find out a little on your own - contrary to a common misconception, it's not the sole purpose of members of this list to write all your code for you.
The old favourites RTFM and STFW would serve you well here - there are thousands of PHP tutorials that will tell you how to write complex if statements, and the PHP Manual has an entire section devoted to handling authentication with PHP here: http://uk.php.net/manual/en/features.http-auth.php
Hope this helps
Cheers
Chris
John Nichel wrote:
Burhan Khalid wrote:[snip]And read here too. http://us4.php.net/manual/en/language.control-structures.php#control-structures.ifAnd here is the action page, testing2.php. if ($_POST['user'] == 'Andrew') && ($_POST['pass'] == 'pass') { echo "Welcome, Andrew."; } And (shocker!) I got a blank page. So I turned out display errors and got this: Parse error: syntax error, unexpected T_BOOLEAN_AND in c:\TSW\pages\testing2.php on line 3PLEASE ... read the manual on basic syntax.