HTTP Authentication in PHP
Sometimes you might wish to make certain pages of your site just perceptible to a chosen few. you can do this by utilizing Phps constructed within Http Authentication. The code ought to go right at the highest point of your php page so don't get 'headers Already Sent' mistakes. You can see that we've specified the username and secret word in the variables at the highest point of the script you can change these to reflect your own particular username and watchword. You could effortlessly make this verification more dynamic by checking a database for the username and watchword. We can get whatever the client sorted into the dropdown box by tagging the accompanying superglobals. //Username: <?php echo $_SERVER['PHP_AUTH_USER'];?> //Password: <?php echo $_SERVER['PHP_AUTH_PW'];?> The Code <?php $config['admin_username'] = "demo"; $config['admin_password']…