This is untested but should work.
php Code:
<?php session_start(); if (isset($_SESSION['myPass'])){ header("Location: index.php"); } ?> <?php $myUsername=""; $myPass=""; //convert the POST variables from the html to local variables if (isset($_POST['myUsername'], $_POST['myPass'])){ $Admin = mysql_real_escape_string($_POST['myUsername']); $Pass = mysql_real_escape_string($_POST['myPass']); header("Location: admin.php"); }else { echo 'Something went wrong'; } ?>




Reply With Quote