Untitled UI logotext
Solutions
WebsitesEcommerceMobile AppsWeb AppsProduction Support & Maintenance
Our work
Company
About usBlogPodcastContact us
Book a free consultation

How to create a silent [password] prompt in PHP

Olivia Rhye
PHP password prompt script for MySQL

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:

Ready to start a project?

Book a free consultation
Untitled UI logotext
Our work
About us
Blog
Careers
Submit a ticket
Agency Partnerships
Contact
© 2024 fjorge. All rights reserved.
Privacy