当前位置: 代码迷 >> PHP >> PHP- -依旧时间有关问题
  详细解决方案

PHP- -依旧时间有关问题

热度:273   发布时间:2016-04-29 01:40:43.0
PHP- -依旧时间问题
下列代码要实现的是每天登陆那 就会加2积分 
  报错: Parse error: syntax error, unexpected T_VARIABLE in C:\AppServ\www\user_reg\login.php on line 28
 
  $thistime=date("Y-m-d"); //28行
$lasttime=$row['logTime'];
if(($thistime-$lasttime)>=86400 )
{ mysql_query("update register set logTime=now() where id=$result['id']" ) ; 
mysql_query("update register set score=$row['score']+2 where id=$result['id']" ); 
}
还有,if语句不知对否?鄙人新手~~~~求赐教

------解决方案--------------------
echo '今日你已获得登陆积分:'.$row['score'];
又发现了个,字符串连接符是. 不是逗号
  相关解决方案