Ultra Posted February 13, 2009 Report Share Posted February 13, 2009 (edited) The code is as following: <?php $Register_Connection = mysql_connect('mysql2.freehostia.com', 'jefdur3_Users', '***'); if (!$Register_Connection) { die('Could not connect: ' . mysql_error()); } $Select_Db = mysql_select_db('jefdur3_Users'); if (!$Select_Db) { die('Could not find DataBase: ' . mysql_error()); // checks if the username is in use if (!get_magic_quotes_gpc()) { $_POST['Username'] = addslashes($_POST['Username']); } $usercheck = $_POST['Username']; $check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'") or die(mysql_error()); $check2 = mysql_num_rows($check); //if the name exists it gives an error if ($check2 != 0) { die('Sorry, the Username '.$_POST['Username'].' is already in use.'); } // this makes sure both passwords entered match if ($_POST['Password'] != $_POST['Confirm Password']) { die('Your passwords did not match. '); } mysql_close($Register_Connection); echo 'You may now Login' . ' '; ?> Yet the error is as following: Parse error: parse error, unexpected $ in /home/www/thepokeplasmarpg.freehostia.com/insert.php on line 44 Edited February 14, 2009 by Ultra Quote Link to comment Share on other sites More sharing options...
falkencreative Posted February 14, 2009 Report Share Posted February 14, 2009 Looks like you are missing a closing "}" someplace in your code Your code has an opening "{" but no closing: if (!$Select_Db) { die('Could not find DataBase: ' . mysql_error()); Quote Link to comment Share on other sites More sharing options...
Ultra Posted February 14, 2009 Author Report Share Posted February 14, 2009 Okay, then there's: Table 'jefdur3_Users.users' doesn't exist After the other thing is fixed. I'm guessing that I misnamed something. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted February 14, 2009 Report Share Posted February 14, 2009 Yeah, that would be a database issue... make sure that you are being consistent -- the case of the letters matter. Quote Link to comment Share on other sites More sharing options...
Ultra Posted February 14, 2009 Author Report Share Posted February 14, 2009 So, what exactly do you mean? The Table on the DB might have a different name than that of what I put, or it has different caps, and such? Quote Link to comment Share on other sites More sharing options...
JBall Posted February 14, 2009 Report Share Posted February 14, 2009 yes. Quote Link to comment Share on other sites More sharing options...
Ultra Posted February 14, 2009 Author Report Share Posted February 14, 2009 Now, where exactly would that be? $Register_Connection = mysql_connect('mysql2.freehostia.com', 'jefdur3_Users', '***'); or $Select_Db = mysql_select_db('jefdur3_Users'); I like to get all my facts before fixing something. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted February 14, 2009 Report Share Posted February 14, 2009 Now, where exactly would that be? $Register_Connection = mysql_connect('mysql2.freehostia.com', 'jefdur3_Users', '***'); or $Select_Db = mysql_select_db('jefdur3_Users'); I like to get all my facts before fixing something. It's consistent in the above sample, I'm just saying that the error may come from a simple thing like your host database being set up as "jefdur3_users" and the name you are using in the script is "jefdur3_Users". Quote Link to comment Share on other sites More sharing options...
Ultra Posted February 14, 2009 Author Report Share Posted February 14, 2009 (edited) Ah, okay. It's something to do with line 3, I'll look into it. $Register_Connection = mysql_connect('mysql2.freehostia.com', 'jefdur3_Users', '***'); That's the line with the error, in case anyone notices anything, because everything matches the Db and the Table. Error = Table 'jefdur3_Users.users' doesn't exist Newest Error, and Idk what it means, because Idk where I put the table. In fact, are you supposed to specify the table? Edited February 14, 2009 by Ultra Quote Link to comment Share on other sites More sharing options...
Ultra Posted February 14, 2009 Author Report Share Posted February 14, 2009 (edited) Nvm, it's something with the Password. Your passwords did not match. So, it's obviously something with the code that means the passwords must match, because when I enter the password, they match. Edited February 14, 2009 by Ultra Quote Link to comment Share on other sites More sharing options...
jbwebdesign Posted February 15, 2009 Report Share Posted February 15, 2009 CHECK UR PHP MY ADMIN FOR DATABASES AND TABLES TO SEE IF YOUR TABLE jefdur3_Users.users EXISTS OR NOT IT SEEMS TO ME THAT THE jefdur3_Users.users table doesn't seem to be inside that database or maybe it is misspelled.....such as the capitol U in users etc. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.