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

[code]

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

#center {
margin-left:500px;
margin-right:500px;
margin-top: 100px;
overflow:none;
}

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

if(isset($_POST[‘submit’])){
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 }

?>

[/code]

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