Password Protected page help

heres the code, im new to php and any advice on what i did wrong or the solution would be appreciated


Amy-Grace Web Chat body { background: #33FF99; }

#center {
margin-top: 100px;

<?php $password = "robsam"; //Change to whatever you want your password to be

if($_POST[‘password’] == $password){

Get your own Chat Box! Go Large!
echo "Please enter Password to proceed"; } else { echo "sorry the password were incorrect"; } } else { ?> Password: <?php }



my aim is to create a page that asks for a password and once you enter the correct password it will show the content otherwise it will display a message saying incorrect password

can a moderator hide the code and lock the thread its been solved

Sponsor our Newsletter | Privacy Policy | Terms of Service