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 y
Hi,
> Thanks for the input, but unfortunately I have no idea how to do that,
> though
> I do have a MySQL server for my site. I'm still trying to learn basic PHP,
> I
> haven't moved on to PHP and MySQL connections and stuff yet.
If you're talking about authentication, there are two metho
Thanks for the input, but unfortunately I have no idea how to do that, though
I do have a MySQL server for my site. I'm still trying to learn basic PHP, I
haven't moved on to PHP and MySQL connections and stuff yet.
-Andrew
Burhan Khalid wrote:
[snip]
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
[snip]
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\testing
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.";
}
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:
http://www.thesonicworld.net/pages/testing2.php";>
Username:
http://www.thesonicworld.net/pages/testing2.php
Try this. Add it to the very beginning.
[EMAIL PROTECTED] wrote:
> You were right, my display_error function was turned off. I turned it on and
> get this:
>
> Parse error: syntax error, unexpected T_IS_EQUAL in c:\TSW\pages\testing2.php
> on line 3
>
> So it isn't working. How do I get to let
[EMAIL PROTECTED] wrote:
You were right, my display_error function was turned off. I turned it on and
get this:
Parse error: syntax error, unexpected T_IS_EQUAL in c:\TSW\pages\testing2.php
on line 3
So it isn't working. How do I get to let me make comparisons between the post
data and somethi
You were right, my display_error function was turned off. I turned it on and
get this:
Parse error: syntax error, unexpected T_IS_EQUAL in c:\TSW\pages\testing2.php
on line 3
So it isn't working. How do I get to let me make comparisons between the post
data and something else? I figure if I ca
[EMAIL PROTECTED] wrote:
I appreciate the help, but unfortunately it still doesn't work. I changed
testing2.php, the action page to do this:
if ($_POST['user']) == me {
echo "Andrew";
} else {
echo "not me";
}
?>
I still get a blank page. What's more I turned on Display Errors and
resta
I appreciate the help, but unfortunately it still doesn't work. I changed
testing2.php, the action page to do this:
I still get a blank page. What's more I turned on Display Errors and
restarted the server, but still got no error message.
I don't know what the problem is, maybe there is somet
On Sunday 19 September 2004 21:47, [EMAIL PROTECTED] wrote:
> I'm trying to password protect a page with PHP, using forms and $_POST data
> and all that stuff.
I strongly suggest you search out a few tutorials on this subject.
google > php authentication tutorial
would be a good start.
--
J
* Thus wrote [EMAIL PROTECTED]:
>
> This page shows up ok, with the form generating just fine. The problem is
> when I get to the action page, testing2.php. Here is that:
>
>
> if ($_POST['user']) == me {
>
> echo "it's me!";
>
> } else {
>
> echo "not me";
>
> ?>
You have a parse error,
14 matches
Mail list logo