Jump to content
MakeWebGames

Modern Php cause me errors:(


Recommended Posts

After my host updated its php i have had lots of errors on my game.

I have changed most of it to get rid of most the errors but i got this one im not sure how to change.

$_POST['name'] = mysql_real_escape_string($_POST['name']);

$_POST['class'] = abs(@intval($_POST['class']));

Here is the error displayed:

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'damagedc'@'localhost' (using password: NO) in /home/damagedc/public_html/business_create.php on line 17

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/damagedc/public_html/business_create.php on line 17

Link to comment
Share on other sites

Pick apart the error and it's very obvious.

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied (So you don't have access...) for user 'damagedc'@'localhost' (using password: NO(You've not set a password in config.php)) in /home/damagedc/public_html/business_create.php on line 17

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established(No connection) in /home/damagedc/public_html/business_create.php on line 17

Which clearly shows your information to connect to the MySQL server is incorrect. You'll need to find the correct information (as others have said) and input it into your config.php file, considering you need to be connected to the MySQL server before mysql_real_escape_string will work.

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.

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.

×
×
  • Create New...