Location: PHPKode > scripts > PHP Reciprocial Links > php-reciprocial-links/admin/login.php
<?
include_once("myconnect.php");
if (  !IsSet($_REQUEST["username"]) || !IsSet($_REQUEST["password"]) )
{
 header("Location: ". "index.php?msg=" . urlencode( "Please enter login information!") );
}

  $sql = "SELECT * FROM reciprocal_admin WHERE username = '" . $_REQUEST["username"] . 
    "' AND password = '" . $_REQUEST["password"] . "'" ;

$rs_query=mysql_query($sql);
if ( $rs=mysql_fetch_array($rs_query)  )
{

session_start();
session_register("adminname" );
session_register("adminid" );
$_SESSION["adminname"]=$rs["username" ] ;
$_SESSION["adminid"]=$rs["id" ] ;
header("Location: ". "adminhome.php?id=121&pg=1&msg=". urlencode("Welcome to Admin Area!" ));
}
else
{
 header("Location: ". "index.php?msg=". urlencode("Please enter correct login information!") );
}
?>
Return current item: PHP Reciprocial Links