/ Published in: PHP
Created by me as a quick and secure way of creating a username and password for basic authentication via a .htpasswd file on an Apache server.
A live demo is available at http://www.chrishair.co.uk/supgha/
Thanks.
A live demo is available at http://www.chrishair.co.uk/supgha/
Thanks.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // - - - - - - - - - - - - - - - - - - - // Author: Christopher Hair // Website: www.chrishair.co.uk // - - - - - - - - - - - - - - - - - - - $error = ''; $error .= "<p><strong>Invalid Username.</strong></p>\n"; } $error .= "<p><strong>Invalid Password.</strong></p>\n"; } if ($error == '') { echo "<p>Success</p>\n"; } else { echo $error; } } ?>
URL: http://www.chrishair.co.uk/supgha/