I have a PHP script on a remote web server that enables me to view the contents of a mySQL table... What do I need to do inorder to force somebody, who wants to view this script using an internet browser, to enter a username and password?
header('WWW-Authenticate: Negotiate'); $user = $_POST['PHP_AUTH_USER']; $pass = $_POST['PHP_AUTH_PASS'];
you could write you own authentication routine in PHP or just simply use server level authentication. if you are using Apache then check out password protection using htaccess.