Everytime I run this, it kicks to the “Either you don’t have an account, or you entered the wrong Username or Password!” in verify.php
All my coding.
after user clicks submit to register for the site
“welcome.php”
[php]
Error
"; echo "Sorry, that USERNAME is taken. Please go back and try again.
"; } else { if (mysql_num_rows($checkemail) == 1) { echo "Error
"; echo "Sorry, that EMAIL is taken. Please go back and try again.
"; } else { if ($password != $cpassword) { echo "Error
"; echo "Sorry, The second PASSWORD you entered doesn't match the first PASSWORD. Please go back and try again.
"; } else { if ($verify != "walker") { echo "Error
"; echo "Sorry, Luke's name isn't Luke Sky". $verify .". Please go back and try again.
"; } else { $sql="INSERT INTO reguserstest (continent, email, handle, pword, toonname, lvl, faction, class, aclass, type, server, rating, 2v2, 3v3, 4v4) VALUES ('$_POST[cont]', '$_POST[email]', '$_POST[handle]', '$_POST[pword]', '$_POST[toonname]', '$_POST[lvl]', '$_POST[faction]', '$_POST[class]', '$_POST[aclass]', '$_POST[type]', '$_POST[server] ',0,0,0,0)"; if (mysql_query($sql,$con)) { header("Location: login.php"); } else { echo "Error
"; echo "Sorry, your registration failed. Please go back and try again.
"; } } } } } } mysql_close($con); ?>[/php]
At this point if run
[php]
$result = mysql_query(“SELECT * FROM reguserstest”);
mysql_fetch_array($result))[/php]
it will show me all of the information i just entered in register.php and written with welcome.php
Now, welcome.php (when successful) takes me to
login.php
when i click login on login.php it takes me to
verify.php
[php]$username = mysql_real_escape_string($_POST[‘username’]);
$password = md5(mysql_real_escape_string($_POST[‘password’]));
$sql=“SELECT * FROM reguserstest WHERE handle=’$username’ and
pword=’$password’”;
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1){
session_start();
$_SESSION[‘username’] = $username;
$_SESSION[‘password’] = $password;
$_SESSION[‘loggedin’] = 1;
header(‘location:success.php’);
}
else {
echo "
TORBattles - Login
include ‘…/header.php’;
echo "
UH-OH!
Either you don’t have an account, or you entered the wrong Username or Password!
Click here to return to Login screen
include ‘…/footer.php’;
echo "
";
}[/php]
After i login using the exact information, which i’m 100% positive is written to the table, it takes me to
“Either you don’t have an account, or you entered the wrong Username or Password!”
any help is appreciated. thank you!