Pls help me with this code..
<?php
include "dbConfig.php";
if ($_GET["op"]=="login")
{
if (!$_POST["FullName"] || !$_POST["StudentID"])
{
die("You need to provide a username and password.");
}
$q = "SELECT * FROM `register`
WHERE `FullName`='".$_POST["FullName"]."'
AND `StudentID`='".$_POST["StudentID"]."'
LIMIT 1";
$r = mysql_query($q);
if ($obj = @mysql_fetch_object($r))
{
$_SESSION["FullName"] = $_POST["FullName"];
$_SESSION["StudentID"] = $_POST["StudentID"];
header("location:members.php");
}
else
{
die("Sorry, could not log you in. Wrong login information.");
}
}
else
{
echo "<form action=\"?op=login\" method=\"POST\">";
echo "Username: <input name=\"StudentID\" size=\"15\"><br />";
echo "Password: <input type=\"password\" name=\"password\" size=\"8\"><br />";
echo "<input type=\"submit\" value=\"Login\">";
echo "</form>";
}
?>
The problem is it is still saying "You need to provide a username and password." please anyone help me..
My username is the FullName and my password is the StudentID..