The following is my code and it wont connect.
<?
$name=$HTTP_POST_VARS["name"];
$email=$HTTP_POST_VARS["email"];
$account=$HTTP_POST_VARS["account"];
$username=$HTTP_POST_VARS["username"];
$password=$HTTP_POST_VARS["password"];
$conf_pass=$HTTP_POST_VARS["conf_pass"];
$paypal=$HTTP_POST_VARS["paypal"];
if ((!$name) || (!$email) || (!$account) || (!$username) || (!$password) || (!$conf_pass)){
header("Location: http://65.26.138.33/signup.php?error=1");
exit;
}
if ($password != $conf_pass){
header("Location: http://65.26.138.33/signup.php?error=2");
exit;
}
$db_name = "diablo";
$table_name = "users";
$connection = mysql_connect("http://65.26.138.33", "Real_user_name", "Real_password") or die("Couldn't connect.");
//Of course in my code I include my username and password.
$db = mysql_select_db($db_name, $connection) or die("Couldn't select database.");
$sql = "
SELECT * FROM $table_name
WHERE username = \"$username\"
";
$result = mysql_query($sql, $connection) or die("Couldn't execute query.");
$num = mysql_numrows($result);
if ($num != 0){
header("Location: http://65.26.138.33/signup.php?error=3");
exit;
}
$sql_two = "
INSERT INTO $table_name
(name, email, account, username, password, paypal)
VALUES
(\"$name\", \"$email\", \"$account\", \"$username\", \"$password\", \"$paypal\")
";
$result = mysql_query($sql_two, $connection) or die("Couldn't execute query.");
$msg .= "Sender's Name:\t$name\n";
$msg .= "Sender's Email:\t$email\n";
$msg .= "Thank you for joining the AB Diablo Trading post.\n";
$msg .= "You should be able to find all of the items your looking for and more.\n";
$msg .= "\n";
$msg .= "\n";
$msg .= "\n";
$msg .= "\n";
$msg .= "Thank you\n";
$msg .= "Wylim (Webmaster)";
$to = "$email";
$subject = "Confirming Email for AB Diablo Trading Post";
$mailheaders = "From: AB Diablo Trading Post \n";
$mailheaders = "Reply-To: aautrey@kc.rr.com\n\n";
mail($to, $subject, $msg, $mailheaders);
?>
<HTML>
<HEAD>
<TITLE>Signup Parser</TITLE>
<HEAD>
<BODY>
<?
echo "
You entered the following information.<br>
Name: $name<br>
Email: $email<br>
Battle.net Account: $account<br>
Username: $username<br>
Password: $password<br>
PayPal: $paypal<br>
";
?>
</BODY>
</HTML>
I use IIS as a Server on Windows XP with a FAT 32 file system