ActionScript
CODE
on (release) {
if (((RegUser.text != "") && (RegPass1.text != "") && (RegPass2.text != ""))&&(RegPass1.text == RegPass2.text)) {
loadVariablesNum("register.php", 0, "POST");
words2 = "Begin Registration process";
}
else{
words2 = "Please enter a username and password";
}
}
registration.php
CODE
<?php
print "Here!";
mysql_connect("localhost","eigoland_koniak","MYPASSWORD") or die();
mysql_select_db("eigoland_rits") or die();
$usercheck = $_POST['RegUser'];
$check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'")
or die();
$check2 = mysql_num_rows($check);
if ($check2 != 0) {
print "words=Username already exists.&checklog=1";
die();
}
$insert = "INSERT INTO users (username, password)
VALUES ('".$_POST['RegUser']."', '".$_POST['RegPass1']."')";
$add_member = mysql_query($insert);
print "words=You are registered.&checklog=2";
die();
?>
It never even prints the text "HERE!", which make me think the PHP isn't even being called in the first place and it obviously doesn't make a new record in the mySQL DB, Any ideas? Should I be using "localhost" ? or something else for the IP? I'm going to do a little research and make sure it's not my ActionScript as well.
You can have a look at it here:http://www.eigoland.vndv.com/game.html