Jump to content

How Can I Do This?


TKW22

Recommended Posts

1. I made a points system so ppl could buy stuff with the points but what if I want to make it so that they had to pay for it every mouth?How would I go about doing this?2. I would also like to make it so that it adds like 200 points a mouth to there account.I made a pay system using mysql so it saves what they bought.

Link to comment
Share on other sites

You probably want to set up a script that runs at the end of each month to update everything. On Linux, the crontab tool is used to set up tasks like that.
Is there a way to do it with just mysql and php. Because i have no clue on how to do that.
Link to comment
Share on other sites

2. solved i just cant seem to make the same code work for the other one lol.i just used date(my) and got the renew date form mysql and used !=.

Link to comment
Share on other sites

You lost me, I'm not sure what you're talking about.
the code i made is this
<?phpsession_start();require_once 'website/login/db.php';$checkpoints =  mysql_query("SELECT points, renew FROM users WHERE name='{$_SESSION['user_name']}'");$pois = mysql_fetch_assoc($checkpoints);$date2 = date("my");$update = "";if ($pois['renew'] != $date2){   mysql_query("UPDATE users SET points=points + 200, renew={$date2}  WHERE name='{$_SESSION['user_name']}'");   $update .=  $_SESSION['user_name'] . "you have more points we added 200 so you now have{" . $pois['points'] . "}";}else {$update .= "welcome " . $_SESSION['user_name'] . " you have got your points for this mouth. you have {" . $pois['points'] . "}";}?>

but when i try to use that to make it so you have to pay monthly i cant get it to work.

Link to comment
Share on other sites

I don't really know how you expect that to make people pay, but if it's not working like you want it to then print out the values you're using to see what they are. Check for errors on the queries, it looks like you're missing some quotes in one.

Link to comment
Share on other sites

I don't really know how you expect that to make people pay, but if it's not working like you want it to then print out the values you're using to see what they are. Check for errors on the queries, it looks like you're missing some quotes in one.
im thinking ill have to make a data base for the stuff that they paid with (points) and in that make a payed spot and the date payed in another.that code works for what i want there but im trying to re-make it so you have to pay for an image mouthy.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...