Hello. I have an issue and I cannot seem to find the error. Right now, my error is this:
I have a config file which has the correct parameters, and it is called up by my validation script, and the parameters simply as they are, username and password, are passed via post to the processing form. Here is the first form that it comes from:
<html>
<form method="post" action="validate.php">
<table>
<tr>
<th>User Name</th>
</tr>
<tr>
<td><input type="text" name="uname" size="10" value="username"></td>
<tr>
<td><input type="password" name="pass" size="10" value="password"></td>
</tr>
<tr>
<td><input type="submit" value="Sign-In"></td>
</tr>
</table>
</form>
</html>
Now, here is the form that it gets passed into for processing:
<?php
session_start();
include "config.php";
$_SESSION['valid'] = false;
$user = $_POST['uname'];
$pword = $_POST['pass'];
//$pword=md5($password);
$result = mysql_query("SELECT * FROM mylog WHERE uname LIKE `admin`") or exit(mysql_error());
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
if($row['passwd'] == $pword)
{
$_SESSION['valid'] = true;
$_SESSION['user'] = $row['username'];
echo "Valid Login";
$_SESSION['sdisplay'] = "notchosen";
}
}
?>
I am not sure why I am getting the error message listed above.