© 2024 fjorge. All rights reserved.
How to create a silent [password] prompt in PHP

I'm creating a script that needs to ask for the MySQL root password and want to do a classic password prompt that doesn't output the characters. I found this handy script that takes care of it.
The basic premise of the script is to detect windows. If found, use vbscript to create a popup InputBox. Otherwise, good ol' linux allows you to suppress output:
Here's the whole script: