Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make the password field not show the password, instead show **

Status
Not open for further replies.

DarkMercenary44

Technical User
May 19, 2000
55
US
I'm makeing a program and want it to be password protected, I want the password to print out &quot;*&quot; when they type a letter, that way the real password isn't shown, but i still want the password itself stored in a variable when they hit enter, so I can match it against a database.<br><br>HELP
 
REM To create an invisible password:<br>CLS<br>Locate 10<br>Row = POS(1)<br>Col = CSRLIN<br><br>PRINT &quot;Type your password and then press [ENTER] when finished&quot;<br>PRINT<br>DO<br><br>P$ = INPUT$(1)<br>SELECT CASE P$<br>CASE CHR$(13)<br>EXIT DO<br>CASE ELSE<br>Password$ = Password$ + P$<br>x = LEN(Password$)<br>LOCATE Row, Col<br>PRINT STRING$(x, &quot;*&quot;)<br><br>END SELECT<br>LOOP<br><br>OPEN &quot;PASSWORD.DAT&quot; FOR OUTPUT AS #1<br>PRINT #1, Password$<br>CLOSE<br><br><br>REM To get the password at a later date add thes lines to your working program:<br>OPEN &quot;PASSWORD.DAT&quot; FOR INPUT AS #1<br>LINE INPUT #1, Password$<br>CLOSE<br><br><br><br>
 
Thanks the info is greatly appreiciated <p>DarkMercenary<br><a href=mailto:DarkMercenary44@yahoo.com>DarkMercenary44@yahoo.com</a><br><a href= > </a><br>In the real world<br>
As in dreams<br>
Nothing is quite<br>
What it seems<br>
:Book of Counted Sorrows
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top