•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,612 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,616 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 3158 | Replies: 5
•
•
Join Date: Apr 2004
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
hello.. I am just testing a simple PHP password/verify form... and I don't know why its not working. I am new to PHP but I have looked at other sample codes and mine seems to be okay in my eyes...
I have two files... password.html and password.php.
password.html looks like this:
and password.php looks like this:
Now when I enter Rob as the name, i STILL get "I am sorry the password is incorrect. Please go back and try again" ... I don't understand why this is happening. No matter what I put as the password in the form, I still get the I am sorry message. Please help... this is probably something really simple but I'm just too new at this to catch it. The server is running PHP 4.3.4 and is hosted with OSX Panther Server 10.3.
I just want to be able to create small password frms, where someone can enter a password and proceed to the next page.
try it for yourself http://www.impassible.com/documents/.../password.html
Thanks alot...
I have two files... password.html and password.php.
password.html looks like this:
<html> <head> <title> Password Script </title> </head> <body> <center> <form name="form1" method="post" action="password.php"> <input name="username" type="text" id="username"> <p>Enter your First Name Please</p> <input type="submit" name="Submit" value="Submit"> </form> </center> </body> </html>
and password.php looks like this:
<?php
if ($username == "Rob")
{
print "Yay, Rob you are logged in!";
}
else
{
print "I am sorry the password is incorrect. Please go back and try again";
}
?>Now when I enter Rob as the name, i STILL get "I am sorry the password is incorrect. Please go back and try again" ... I don't understand why this is happening. No matter what I put as the password in the form, I still get the I am sorry message. Please help... this is probably something really simple but I'm just too new at this to catch it. The server is running PHP 4.3.4 and is hosted with OSX Panther Server 10.3.
I just want to be able to create small password frms, where someone can enter a password and proceed to the next page.
try it for yourself http://www.impassible.com/documents/.../password.html
Thanks alot...
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- Posting e-mail form problems (HTML and CSS)
- Need help in design and javascript code for Dynamic form (JavaScript / DHTML / AJAX)
- cannot link a form to a nonform application in microsoft j++ (Java)
Other Threads in the PHP Forum
- Previous Thread: need a personal mentor
- Next Thread: PHP email problem



Threaded Mode