Jump to content
MakeWebGames

Recommended Posts

Posted

Ok. Let me start by saying what I'm trying to do. I am trying to make it where a users when they are buying a house they do not have to sell there old one. I have a forumla but it don't seem to work.

 

$pr=(int) ($np['hPRICE']);
$price=(int) ($np['hPRCE'] - $pr);

 

I have also tried.

 

$pr=$mp['hPRICE'];
$price=$mp['hPRCE'] - $pr;

 

Also have tried

 

$pr=($mp['hPRICE']);
$price=($mp['hPRCE'] - $pr);

 

The query before this to call the houses is.

 

$mpq=mysql_query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}",$c);
$mp=mysql_fetch_array($mpq);

 

There are more querys. As if you have v1 you can look in your estate page and see. But they don't have anything to do with what I'm trying to do, lol.

This is the query I am running to buy the house.

 

mysql_query("UPDATE users SET money=money-$price, will=0, maxwill={$np['hWILL']}, WHERE userid=$userid",$c);

 

What it is not doing is it's not taking the money from the user for the house.

Just wondering if anyone might have an idea what I'm doing wrong. I really don't see what I'm doing wrong, lol.

Thanks for the help.

Posted

Re: Houses

Dang....I can't believe I missed that...Your right, lol...I have to come up with another forumla to call the price of the house they are buying minus the price of the house they have already.

Posted

Re: Houses

Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/hoopitne/public_html/estate.php on line 23

thats is on the

 

$price = $np['hPRICE'] - $ch->hPRICE;

 

I have tried a number of things and can't get that error gone....Man I must be getting worst at the coding, lol

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