Hey,
I wanted to have a small and very basic login form and the part that the user will access if the password is correct...
Well, the code doesn't return errors but it doesn't seem to work either. It will display the form even if the password is incorrect. I want it to only display it if it is correct.
<?php include('/home/basichy/public_html/ict/beginning.php');
$pass = $_POST["pass"];
If( $pass = "alper" ) {
include('/home/basichy/public_html/ict/secure/admin/addbookinside.html');
}
else {
print "<div class=\"small box\"><center><h2>Enter Admin Area Password:</h2>
<table><tr><td>
<form action=\"/ict/admin/add.php\" method=\"POST\">
<table>
<tr><td>Password</td><td><input type=\"password\" name=\"pass\" size=\"8\">
</td></tr><tr><td colspan=\"2\"><div align=\"right\">
<input type=submit value=\"Login\" class=sbmt>
</div></td></tr>
</table></form>
</td></tr></table></div>";
}
include('/home/basichy/public_html/ict/end.html');
?>
And, as you can see if the password is incorrect it will display the login form.
What's wrong? 😕
Thanks!