Help - Search - Members - Calendar
Full Version: Registration Not Working
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
koniak
Ok So I have a Flash Program that calls a file named registration.php

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
NaRzY
Grr. Use [code] tags whenever you post source code so next time your post is readable.

EDIT: Don't worry now, I fixed it. Remember it for next time.

Jacob.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.