Alright. I got everything working now.. Just my register.php script is acting weird, as well as my login.php script. When I first installed the scripts, all the info submitted from register.php went into the database I created via mysql. Now.. the info I submit from register.php won't even go into the database! Also this part of the code won't work either...
<?php
if ($action == "register") {
if (!$user || !$pass || !$email || !$vpass ) {
print "You must fill out all fields.";
include("foot.php");
exit;
}
$dupe1 = mysql_num_rows(mysql_query("select * from players where user='$user'"));
if ($dupe1 > 0) {
print "Someone already has that username.";
include("foot.php");
exit;
}
$dupe2 = mysql_num_rows(mysql_query("select * from players where email='$email'"));
if ($dupe1 > 0) {
print "Someone already has that email.";
include("foot.php");
exit;
}
if ($pass != $vpass) {
print "The passwords do not match.";
include("foot.php");
exit;
}
$ref = strip_tags($ref);
$user = strip_tags($user);
$pass = strip_tags($pass);
if ($ref) {
mysql_query("update players set refs=refs+1 where id=$ref");
}
mysql_query("insert into players (user, email, pass) values('$user','$email','$pass')") or die("Could not register.");
print "You are now registered to play, $user. Please login now.";
}
?>
I don't know why and I'm starting to get a headache O_o.
Here's the login.php code
<?php
if (!$email || !$pass) {
include("head.php");
print "Please fill out all fields.";
include("foot.php");
exit;
}
include("head.php");
$logres = mysql_num_rows(mysql_query("select * from players where email='$email' and pass='$pass'"));
if ($logres <= 0) {
print "Login failed. If you have not already, please signup. Otherwise, check your spelling and login again.";
include("foot.php");
exit;
} else {
session_register("email");
session_register("pass");
print " <br>Welcome back. Please click <a href=updates.php>here</a> to continue..";
}
include("foot.php");
?>