MYSQL Query if & nbsp; (substr ($ remessage,) & #39; TP & #39;) {$ PSNstr_replace (& #39; TP & #39 ;, & #39; & #39;, $ remessage); echo & nbsp; $ PSN; exit; SQL & quot; select & nbsp; id & nbsp MYSQL Query
If (substr ($ remessage, 0, 2) = 'TP '){
$ PSN = str_replace ('TP ', '', $ remessage );
Echo $ PSN;
Exit;
SQL = "select id from tempnum where id = '". intval ($ PSN )."'";
$ Rs = $ conn-> execute ($ SQL );
If ($ rs-> EOF)
{
SMSSendReturnStr ($ config ['sp '], $ rs-> fields ["MobileNum"], 'Sorry, you have not found the person you want to vote for. Please check. Thank you for your participation ');
}
Else {
$ Conn-> execute ("update tempnum set PS = PS + 1 where id = '". $ PSN ."'")
}
Break;
Exit;
}
--------------------------------------
$ Remessage refers to the text message sent by the user via the mobile phone. the format is TP000001 TP followed by the ID corresponding to the number, but I don't know why the error is always found. The text message format is correct first.
Parse error: syntax error, unexpected '= 'In D: \ web \ XXX. php on line 90
XIEXIE
------ Solution --------------------
SQL = "select id from tempnum where id = '". intval ($ PSN )."'";
==============================
$ SQL = "....";