Home >Backend Development >PHP Tutorial >PHP- -依旧时间有关问题

PHP- -依旧时间有关问题

WBOY
WBOYOriginal
2016-06-13 10:16:18837browse

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'];
又发现了个,字符串连接符是. 不是逗号

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn