Sorry yet again Ill let you have all the page.
<?php
session_start();
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body>
<?php
$check_name = $_POST['userName'];
$check_password = $_POST['password'];
echo "$check_name";
echo "$check_password";
mysql_connect("xxxxxxxxxxxx","xxxxxxxxxxxx","xxxxxxxxx") or die("Could not connect to MySQL server!");
mysql_select_db("xxx") or die("Could not select database!");
echo "selected db"or die("Could not select database!");
$result = mysql_query("SELECT * FROM accounts WHERE fname = '$check_name' AND password = '$check_password' ")
or die(mysql_error());
$affected_rows = mysql_num_rows($result);
if($affected_rows == 1){
header("Location: index.php");
}
else {
print 'Not Validated';
}
/*if($affected_rows == 1){
print 'Validated';
}
else {
print 'Not Validated';
}
*/
?>
</body>
</html>