Jump to content
MakeWebGames

Recommended Posts

Posted

Just to explain why you got the error message you did.

The member function error you recived was because you was missing $db from the global on line 147.

This line.

global $ir,$c,$userid,$h;

So to fix this error as Equinox did you need to add $db like so.

global $ir,$c,$userid,$h,$db;

Just so you know how to fix these errors in the future.

 

(On a side note you have posted in the wrong part of the forum just so you know for future reference)

Posted

Ok thanks you guys that got the error gone and thanks Lacey for the explanation that helped to really appreciate it. Mods please move this to the right forum sorry for posting in the wrong spot.

Posted

[alertbox]Updated now using php/mysql tags..[/alertbox]

Also, May I ask a question?

 

$sql = sprintf("UPDATE users SET bankmoney=bankmoney-{$_POST['wd']}, money=money+{$_POST['wd']} WHERE userid=$userid");

$db->query($sql);

Why are you using this when there is no need for that to be there? Two lines doing the exact same job as one line...
Posted

i had alittle issue getting it to work right. So before i had came and asked for help i was trying anything i could think of to get it going. after i came here got help i didn't want to change anything and mess it up again.

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