Need Help With These: $_SERVER["PHP_AUTH_USER"] And $_SERVER["PHP_AUTH_PW"] - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Need Help With These: $_SERVER["PHP_AUTH_USER"] And $_SERVER["PHP_AUTH_PW"] (1104 Views)
| Need Help With These: $_SERVER["PHP_AUTH_USER"] And $_SERVER["PHP_AUTH_PW"] by paranorman(op): 3:50pm On Mar 19, 2017 |
xampp 7.0.1 is what I use for executing my PHP scripts. the $_SERVER[] superglobal appears not to have these indexes when I print_r() it. What am I missing? do I have to modify something in the config files? |
| Re: Need Help With These: $_SERVER["PHP_AUTH_USER"] And $_SERVER["PHP_AUTH_PW"] by Nobody: 6:27pm On Mar 19, 2017 |
This question is EXTREMELY unclear, so you should not expect any response to be quite honest. Let me try to help you: 1. What version of PHP came with it (i assume 7.0.0/7.0.1 on guess work) 2. You did not include a screenshot of the DUMP with print_r At the very least, we did not see your code. So i am sorry, I do not have xampp on my pc, so i cannot really help you, sorry! |
| Re: Need Help With These: $_SERVER["PHP_AUTH_USER"] And $_SERVER["PHP_AUTH_PW"] by Olyboy16(m): 8:08pm On Mar 19, 2017 |
paranorman:it doesnt work like that sir. i cant type much code here on mobile, but i'll give you some pseudocode to follow. when you send these headers to the browser. header('WWW-Authenticate: Basic realm="some info text"'); header('HTTP/1.0 401 Uauthorized'); The browser prompts for a auth key. then on submission to the server, you can check those $SERVER indexes. |
| Re: Need Help With These: $_SERVER["PHP_AUTH_USER"] And $_SERVER["PHP_AUTH_PW"] by paranorman(op): 9:39pm On Mar 19, 2017*. Modified: 5:23am On Mar 20, 2017 |
Olyboy16:Thanks, figured it out. |
| Re: Need Help With These: $_SERVER["PHP_AUTH_USER"] And $_SERVER["PHP_AUTH_PW"] by Nobody: 10:20pm On Mar 19, 2017 |
oh i see, that is very good |
Loadednobs Android App Your Reviews Need • Beware Android Developers! Google Has A Warning For You • How To Display Record From A Database