If statement error
This is the Intercept section, so the size brackets may not be noticed, but now it is always jumping to the else and cannot perform the preceding
PHP Code
$sql = "SELECT * from #@__tgreg where userid= ' $id '"; Read Tgreg data sheet, condition userid= URL ID? =*** $NIC _arcrow = $dsql->getone ($sql); Conditions of establishment, a data $tgtime = $NIC _arcrow[' tgtime '); Output Tgreg username value in datasheet $nowjifena= $NIC _arcrow[' Jifena '); $time = time (); if ($dsql->executenonequery ($query) && $tiem-$tgtime > 24*3600 && $nowjifena < 11)//detect write on {//detect there is write on bracket 1//reserved here to write a sentence to get background settings for the number, to Jife Na is not used after the manual $jifena = 1; Manual Setup Jifena recommended an increase in how many points//reserved $jifenb =100;//settings Jifenb recommend an increase in how many points//$dsql->executenonequery ("Update ' #@__member ' set ' Scores ' = scores + $jifena where mid= ' ". $userid." ' //sql Execute Write user bonus points//above This example directly update user data plus 100 points, update user table Member//die ($dsql); $dsql->executenonequery ("Update ' #@__tgreg ' Set ' Jifena ' =jifena + $jifena, ' Cishu ' =cishu+1, ' tgtime ' = $time where userid= ' ". $userid." ' and Username= ' ". $username." ' ");//sql perform write user bonus points//above this sentence update promotion person's integral system Jifena class. Note the distinction between Class A and Class B user tables tgreg//$dsql->executenonequery ("Update ' #@__tgreg ' set ' jifenb ' = Jifenb + $jifenb where userid= '". $ UserID. "' And username= ' ". $username." ' //sql perform write user bonus points//reserved above this sentence update promotion person's integral system Jifenb class. Note the distinction between Class A and Class B user tables Tgreg header (' location:index.html ');//After writing also to jump the}//detection has written in parentheses 2else{echo wrong;}
------Solution--------------------
Since it is to meet $dsql->executenonequery ($query) && $tiem-$tgtime > 24*3600 && $nowjifena < 11 this condition
That's right.
$dsql->executenonequery ($query)
$tiem-$tgtime > 24*3600
$nowjifena < 11
Check it separately.
------Solution--------------------
Dsql->executenonequery ($query) && $tiem-$tgtime > 24*3600 && $nowjifena < 11
Landlord check their own this condition is not satisfied. can output to see.