Topic: Lil' Help..

I added a few things to my forums..

(Geons is Money)
I added a mini-game to my program that gatheres "Geons" when you win. Now every profile has their own Geons I also added a hiscore system, to show the 15 persons with the most Geons. Now, with this money I want them to be able to byu armor/weapons, that will be displayed on the profile.

All I need to know is how to check if the person really has the money.
For example, he chooses the item he wants to buy, then press a button "buy". When the button is click I need it to check if the person has enough money to buy the item he's buying. If he dosn't have the money and error will come up. "You do not have enough money to buy the item!". If he has the money, I want the item to be displayed in his profile.

Any idea how I can check if the user has enough money?

~ ultime

If you want to check the little game: www.kalonline.info/forums/games.php you will have to register.

Re: Lil' Help..

read the amount of "Geons" they have from the database, the price of the item then say
if ($money > $item_price) {
    buy item
}
else {
    go away
}

Re: Lil' Help..

Thank you so much!! I ow you man!

Re: Lil' Help..

btw i just been messing about with the fortune cookie and i found a bug... it still changes your geons even before you have opened a cookie

Re: Lil' Help..

Yeah I know, the page you first access the fortune cookie with is also part of the game, I just don't show the ammount gained..

I will try and fix that..

Re: Lil' Help..

yes, a game that takes full use of the rand(); function smile

pretty fun.. maybe i should port those flash games into here...

be back in about 5 months sad

Indocron
$theQuestion = (2*b) || !(2*b);