says error on line 25, and i really dont see anything wrong therePHP Code:<html>
<h3>Testing Stuff</h3>
<form method = "POST" action ="<?php echo $_SERVER['PHP_SELF'];?>"
<input type = "hidden" name = "send" value = "1">
<p>Username:<input type="text" name="UserName" /></p>
<p>Password:<input type="text" name="Password" /></p>
<input type="submit" value ="Login" />
</form>
<body background="http://users.pandora.be/creeping_death/Babes/Anna%20Kournikova%2002.jpg">
<?php
If ($_POST[send] == "1"){
$Filename = $_POST[UserName];
If (file_exists($Filename)){
$handle = fopen($Filename, "r") or die("Error Reading");
$contents = @fread($handle,filesize($Filename)) or die("Error2");
fclose($handle);
If ($contents == $_POST[Password]){
echo "</br>.Logged in";
}else{
echo "Invalid password";
}
[B]}else{[/B]
$handle = fopen($Filename, "w") or die ("Error writing");
$contents = @fwrite($handle,$_POST[Password];
fclose($handle);
}
?>
</html>![]()





Reply With Quote