When I log into my router's firmware, for example, I get a prompt box for the username and password, How is this done? As far as I can tell, JavaScript's prompt()
only returns one value.. I know it must be server side because the page continues to "load" until I close the box. I also cannot switch tabs in my browser until the box is closed.
Is it possible to do something like this with PHP? How is this done?
Thanks in advance
its done using Basic HTTP Authentication, for this you need to create a user/password file and tell the server that a folder needs to use the Basic HTTP Authentication. This can be done in the server config or in a .htaccess
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With