PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Ive been working on this code for every 30 minutes it adds, lets say 100 points, to a persons total. I dont even know where to get started. Do I try something like:
if ( $time == 00:00,00:30,01:00...and so on)
{
$result = UPDATE BoC SET points=points+$points WHERE username=$username
$gamer = mysql_query($result) or die("Query failed : " . mysql_error());
}
$points = points+100
Except Id actually look at some code instead of typing this just off of my head. So is that even close or am I way off?
Yes. as timvw says - if its an unix server it will be cron, and if its a windows server it will be task scheduler. Find out what OS your server is running and then either google for info on task scheduler or do a 'man cron' on the unix shell.