ok i have this script :
<form method="post" action="file.php">
<input type="password" name="enterpassword">
<input type="submit" value="login">
</form>
<?php
if ( $enterpassword == "monkeysarefun")
{
chmod ("directory/", 0777);
print ("<script> window.location.replace (\"www.somewere.com\")</script>")
}
?>
this is alll in the same file and what i effectivley want to do is password protect the directory named "directory". the directory was chomded to 700 to prevent people seeing the directory. although i keep getting this:
Warning: chmod() [function.chmod]: Operation not permitted in /home/comesept/public_html/introverted/poo/ll.php on line 58
(ok now this script was on a larger script thats why it sayss line 58)
have a chmoded the directory correct? is this error due to my server? is there a better way to password protect a directroy?