I am building a very simple password example. I have 2 text field in my html form, username and password. On submit I call password.php. When I am in there all I thought I had to do was this:
<?
if($username=="me" && $password=="you") {
echo "your in";
}
else {
echo "You have not entered a valid username/password. Remember, they are case sensitive.";
}
?>
it doesn't seem to work though, any ideas? I alo need to know how to call a html page in php, like mypage.html.
Password problem
Moderator: General Moderators
-
mettlehead
- Forum Newbie
- Posts: 15
- Joined: Fri Oct 11, 2002 11:03 am
- Location: Canada
just use after you have loged in.
do u use a html form to login? if so check the username and password fields names.
if you use a form, try this:
don't use ASP style tags, always use <?php ?>....
Code: Select all
include("path/page.html");do u use a html form to login? if so check the username and password fields names.
if you use a form, try this:
Code: Select all
$username = $_POSTї'username'];
$password = $_POSTї'password'];
<?
if($username=="me" && $password=="you") {
echo "your in";
}
else {
echo "You have not entered a valid username/password. Remember, they are case sensitive.";
}
?>-
mettlehead
- Forum Newbie
- Posts: 15
- Joined: Fri Oct 11, 2002 11:03 am
- Location: Canada
Great
Thanks, it works no. 1 Million thanks. 