PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi guys! I'm working on a login script where only me and another administrator can login. (As in it's not a login/register script.) It was all going wonderfully until I went to run it. If you put in the right password, you get to a page that says "Names names names!". If you put in the wrong password, you get something like "Wrong username/password". Or at least your supposed to. As of right now, you get the same page for right or wrong. I got the script when I was browsing through oooold topics, it's off something like page 714. Here's my code:
Your code just compare the variables $name and $name2; $pass and $pass2 and that's it.... different outputs but because your if() statement is satisfied based an the values given above your code will always output Names, names, names!....
Is it supposed to check that username and password are correct for the appropriate user?