I have developed a small application. I created a login panel for it. I have only one user so, I hard coded both user name and password. Below is the code but it is not working.I don’t have any db for this bcoz, it will have only 1 user.
Any help ii be appreciated.
Thanks in advance.
<?php
if(($_POST['na'] = 'admin') == ($_POST['pwd'] = 'zucker'))
{
header("location:first.php");
}
else
{
header("location:index.php?msg=enter correct user name and password");
}
?>
ok, from what I can decipher from your code – you have = and == applied incorrectly. Where you have = you want == and where you have == you want &&
I hope this isn’t how your login model is going to work – whats to stop just anyone going directly to first.php?