Whenever I try to login with the simple page I made. But there is a problem with the lookup to see if that information is in the database or not. All it requires is you to login in with username and password.
Here is the html form :
<p> Login </p>
<form action='login.php' method='POST'>
<input type='text' name='username'/><br>
<input type='password' name='password'/><br>
<input type='submit' name='submit' value='Login'/>
</form>
Here is the script for that form :
<?php
error_reporting(0);
session_start();
$username = $_POST['username'];
$password = $_POST['password'];
include ("connect.php");
if ($username && $password) {
// Info Is Provided
$queryget = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password'");
$numrow = mysql_numrows($queryget);
if ($numrow != 0) {
$_SESSION['username'] = $username;
echo "You Have Been Loggend In. | <a href='members.php'>Go To The Members Page</a>";
} else {
echo "Your Username Was Not Found";
}
} else {
echo "You Did Not Provide All OF The Neccesary Information.";
include ("index5.php");
}
?>
Can you figure why it won't let me Login?