i want to protect a page by password. i know it can done by .htaccess but i dont need that. when a user comes to a page a password box appears. after giving right password it will go to the page
lookup sessions...Its the easiest way to do it.. Just create a login form as you usually would in html. Store your password in a php variable or database or something. Pass the form data to the page where your data is and check the password against the stored one using if...else or something. If password is right start the session... Check here for a start: http://www.devarticles.com/c/a/PHP/PHP-for-Beginners-by-a-Beginners/1/