Parse error: syntax error, unexpected T_BOOLEAN_AND in c:\TSW\pages\testing2.php on 
line 3
My code should do what you want? It uses authenticate? Any how :) I think you are 
missing acouple of brackets?

if (
($_POST['user'] == 'Andrew') && ($_POST['pass'] == 'pass')
)
{
echo "Welcome, Andrew.";
}


[EMAIL PROTECTED] wrote:

> Now moving on to using password protecting with more than one factor.
>
> I'm trying to figure out how to password protect with more than two factors:
> username and password. Here's the form:
>
> <?php
> echo <<<_HTML_
>
> <form method="post" action="http://www.thesonicworld.net/pages/testing2.php";>
> Username: <input type="text" name="user"><br>
> <form method="post" action="http://www.thesonicworld.net/pages/testing2.php";>
> Password: <input type="text" name="pass">
> <br>
> <center><input type="submit" value="Log In"></center>
> </form>
>
> _HTML_;
> ?>
>
> And 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 3
>
> Line 3 being the line with the && stuff. I'm not sure if the whole && thing
> is right...obviously not. How do I password protect with more than one factor?
>
> -Andrew

John

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to