setOAuthDetails($tokey, $secrey); $convert = $fitbit->getActivityStats(); $steps_from_fitbit = $convert->lifetime->total->steps; $ATP = ($steps_from_fitbit - $CS); $FIN = ($ATP + $PS); $result = mysql_query("UPDATE members SET steps='$steps_from_fitbit', add_to_progress='$FIN' WHERE id='$i'") or die(mysql_error()); } echo "good to go"; ?>