Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Password protection in PHP

    Hi all ! I am doing a login form with this script :
    PHP Code:
       <form method = post action = "<? echo $PHPSELF ?> >
     < input type = text name=username> <br>
     <input type  =password name=password >
    <input type = submit >
    then after submit ( with the error or right username and password ) on the address bar always has this line :
    "localhost/test/login.php=?username=bahy&password=123"

    This will let the others to know my user password , then how do i code the user's password and sent it to the address bar so that noone can see the user's password .

  • #2
    Registered User
    Join Date
    Apr 2003
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Futher more , all the script above is in short , and work well . The problem is only in the code the password script , if i don't code it , it will be so clear for event a baby to know .

  • #3
    Regular Coder
    Join Date
    Apr 2003
    Location
    Canada, Ontario, Mississauga
    Posts
    312
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hey

    If you use method = post, the username and password will not show in the address bar (url).

    in your php script, $_POST[username] to retrieve the user name.

    I hope this is what you asking for...

    Mike


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •