I'm really new to PHP, and I'm trying to set up an admin page for my friend's site. He and I are the only ones who will ever need admin access.
Is the following code secure?
Code:<?php if (($_POST[username])=="myusername" AND $_POST[password]=="mypassword") { echo "you made it!"; /* setcookie("admin", "true", time()+3600); */ } else { echo "Access restricted."; } ?>


Reply With Quote

Bookmarks