How to hide what a user has entered with *'s
Hi,
Im pretty new to programming, and couldnt find how to do this anywhere.
Im looking for some code so that when a user enters a 4 digit number or something else, each digit is hidden behind a ****, with the variable still being what the user entered.
Apologies if this is very basic, but we all needed help at some point ;)
Thanks in advance, Stuart
ADDED:
Also, one more question, how would i make sure that the user has entered it as a 4 digit number, instead of using
Code:
variable > 1000 || variable <= 10000
as this doesnt allow numbers begginning with a '0'.
Thanks again, Stuart