SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hiding Passwords from View

    hey guys...

    How do I have a submit box, where a user keys in the password, which displays the keyboard input as a string of ***** ?

    Eg: You always find sites prompting you for a password, where your typing ends up as ******.... how do ya do that?

    I've got the submit box FORM code ready, just need to hide the password display from general view.

  2. #2
    SitePoint Zealot alexk's Avatar
    Join Date
    Nov 2000
    Location
    Sydney, Australia
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <input type="password">

  3. #3
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how about if I create a PASSWORDS field in mySQL, and I would like all entries to be displayed as ****** when I do a SELECT?

  4. #4
    SitePoint Member
    Join Date
    Aug 2001
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not sure if there is a way, you may have to write a small script that converts the thing over to **** with a length. command.
    Last edited by neotalon; Aug 23, 2001 at 23:50.
    signature

  5. #5
    SitePoint Zealot alexk's Avatar
    Join Date
    Nov 2000
    Location
    Sydney, Australia
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $password str_repeat('*'strlen($password)); 
    Last edited by alexk; Aug 24, 2001 at 02:18.
    Muspy - follow your favourite artists!


Bookmarks

Posting Permissions

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