This is making me made, i want this thing on my site so that the users can only do it once a day. Here is what i have for code so far
if (date('ymd',$uinfo[binterest]) <= $now)
[/php
Here is some code that is arround it
[code=php]
if ($action == "interest") {
if (date('ymd',$uinfo[binterest]) <= $now) {
$interest = $eday + $uinfo[bankmoney];
mysql_query("UPDATE members SET bankmoney='$interest'
WHERE username='$username'");
mysql_query("UPDATE members SET binterest='time()' WHERE
username='$username'");
}
}
$action is from the url
$now = date('ymd',$time); and $time = time()
$uinfo[binterest] is a timestamp of the last time they did the once a day action
$eday is the interest ( it is for a bank script ) that they will get
$uinfo[bankmoney] is what they allready have for money in the bank
$username = $_COOKIE{'user']
Please help