i have this set to a cron and my cron is working correctly it just this script is not working not sure what it could be
<?php
include"connect.php";
$i = 1;
$r = 500;
while ($i < $r) {
$userstats="SELECT * from UserDetails where ID='$i'";
$userstats2=mysql_query($userstats) or die("Could not get user stats");
$userstats3=mysql_fetch_array($userstats2);
$networth = $userstats3[networth];
$email = $userstats3[e_mail];
$compname = $userstats3[company_name];
$id = $userstats3[ID];
$discustomers = $userstats3[dis_cust];
$hapcustomers = $userstats3[happy_cust];
$employee = $userstats3[employee];
$money = $userstats3[money];
$ecar = $userstats3[ecars];
$scar = $userstats3[scars];
$lcar = $userstats3[lcars];
$customers = $discustomers + $hapcustomers;
$tcar = $ecar + $scar + $lcar;
$wealth = $employee*500;
$zip=$money+$wealth;
$well="UPDATE UserDetails SET money=$zip, networth=$networth WHERE ID='$i'";
mysql_query($well) or die();
$i++;
}
?>