I have a page wherein you can view users and their passwords which is shown clearly. What i want to do is show the passwords in asterisk "*" to privatize things... If possible could i also do it in the database(PhpMyAdmin).... Im using Wampserver....
you could output the password into an input box <input type="password" values="your password goes here" /> HTML:
Yeah.. md5($password) before saving it in the DB. Or you could just, when you print the passes count the string, make a for loop that echoes the asterixes.
Whether or not it's the right way to be storing your passwords (I recommend crypt()), you can easily replace characters with asterisks in PHP like so: echo preg_replace("/./", "*", $pass); PHP:
Alriiight... I think he got the hint. How many more people are going to repeat this? Avoid regular expressions whenever possible, they're slow. You can do it this way instead: $password = str_repeat('*', strlen($password)); PHP: (This is about 3 times faster) It's actually preg_replace(). And your question makes no sense. But it's both, real time, and server side. (Like all PHP code).
/me = Perl background. Yes, PHP code is always sever side. If by "real time" you mean browser side, the answer is no.
don't get the point on putting stars on the screen if they cant do much with it? if its a password change box, don't wast time calling passwords and encrypting them just tell them to insert the old password as well!
Before entering the passwords to the db... use md5() which will encrypt them. (Makes your website a lot more secure). Then when validating... MD5 the inputted password then compare it the password located in the DB.