login help php newbie
Posted: Sun Jan 04, 2009 3:54 pm
hello all
Im creating a website that will have many users logings containing; stats, offer, etc
I have the login complete from this tut http://www.phpeasystep.com/workshopview.php?id=6
however
I would like it so if the user supplies a wrong password or username they stay on the same page and I would like to output my own message
instead of moving to a login_check.php page
<form name="form1" method="post" action="login_check.php">
which contains all the database connections and
username/password checking
i was thinking of something like
{
$loginerror = "Wrong Username or Password";
header("location:login.php");
}
on the checking page
then on the login.php
<?php
echo "$loginerror";
?>
but this dont work and i guess that if you failed to login once the message would display each time you go to the same page
please help lol
Im creating a website that will have many users logings containing; stats, offer, etc
I have the login complete from this tut http://www.phpeasystep.com/workshopview.php?id=6
however
I would like it so if the user supplies a wrong password or username they stay on the same page and I would like to output my own message
instead of moving to a login_check.php page
<form name="form1" method="post" action="login_check.php">
which contains all the database connections and
username/password checking
i was thinking of something like
{
$loginerror = "Wrong Username or Password";
header("location:login.php");
}
on the checking page
then on the login.php
<?php
echo "$loginerror";
?>
but this dont work and i guess that if you failed to login once the message would display each time you go to the same page
please help lol