Jump to content
Killersites Forums

Error with no meaning.


Ultra
 Share

Recommended Posts

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 by Ultra
Link to comment
Share on other sites

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".

Link to comment
Share on other sites

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 by Ultra
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...