Using .htaccess 












Using .htaccess/.htpasswd Password Protection 





Coding Tips 








Uploads and Downloads 



Mail 
see it on this page





Working with Images 


Frequently Requested Website Functionality 
see it on this page
see it on this page
see it on this page
see it on this page











Using PHP 




Website Managment 








Other Tips 









Passing user authentication information to PHP
The best way to protect your directory is with htaccess/htpasswd protection. But you may also want to pass the user information to your php scripts so you can do custom processing based on who logged in. You can retrieve the current authenticated user with one php line. Put this in the target script in the protected directory (used in the script after authentication).
<?php
$user = $_SERVER['REMOTE_USER'];
?>
