treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] creating a registration/login system, wondering why problem is happening

  • hallo


    So, my problem is that i have created a user registration and login system with php and mysql, whenever i am testing a page my username and displays a value of "root" (phpmyadmin login name) and a password ***********. I would post the code but there is ALOT but im just trying to see if this is a common issue or something that has an appearence with php and mysql. I normally use asp.net so i'm new to the open side. Loving php and mysql so far though...
  • This is common for login page fields that use username in its name, even if slightly different. If you want to prevent this on your login form add autocomplete="off" to the form tag.


    <form name "login" method="post" action="validator.htm" autocomplete="off">


    Or try renaming the field to something like usrid
  • Actually, it looks like if you have a field type = password, the browser assumes the other field to be for a username, no matter what you call it. But, the autocomplete="off" does work.
  • Elaborating on @osiris 's comment:
    Just a guess.. but if you are testing on localhost, maybe its your browser completing the form using the username/password you had asked it to save for phpmyadmin. The browser considers localhost/phpmyadmin and localhost/yoursite as the same website. The Try testing it on a different browser and check if the problem still exists.
  • @osiris, thanks for the advice, i added that and problem seems to be fixed on localhost.

    @jatinh, Once i uploaded this to my web server i had no problems. I believe the thought it was myphpadmin was probably correct.

    Thanks guys for the assistance..