jeffrydell Posted June 2, 2007 Share Posted June 2, 2007 This seems simple enough, but I haven't found an easy answer in reading posts here or documentation on the official php site. Thanks, in advance, for your patience. I have a users table which includes username, password, and permission level. In the admin screen of the website I would like to display a table of all the users, but don't want to display the passwords on that table ... instead I'd like to just display *s for each character. So if the password was "fish", the table cell would read ****, if the password was phish, the table cell would read *****, etc. I already know about the strlen() function which can tell me the length of the password string, but what do I use to tell php to "say" * once for each character in the string? Quote Link to comment Share on other sites More sharing options...
penguin0 Posted June 2, 2007 Share Posted June 2, 2007 Simple question, why dont you leave the password row out all togather? Quote Link to comment Share on other sites More sharing options...
AndyB Posted June 2, 2007 Share Posted June 2, 2007 for ($i=0;$i<strlen($pass);$i++) { echo "*"; } Quote Link to comment Share on other sites More sharing options...
jeffrydell Posted June 2, 2007 Author Share Posted June 2, 2007 That IS an option - but I don't learn how to do the character replacement by just leaving out the Password. I'm trying to learn & grow a little. The other answer is "I am curious". Quote Link to comment Share on other sites More sharing options...
jeffrydell Posted June 2, 2007 Author Share Posted June 2, 2007 Oddly enough, Andy - that actually makes sense. Thanks! (Gotta learn to think like a super-genius ... I'll put that on my ToDo list for next week.) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.