PHP比较无法正常工作

时间:2018-08-15 08:14:19

标签: php

$snumber = trim($_POST['sn']);
$site_name =strtoupper(trim($_POST['mn']));
$physical = trim($_POST['pp']);
$logical = trim($_POST['lp']);
$port_info =strtoupper(trim($_POST['ti']));             
$srlt = mysql_query("select subscriber,terminationid from portinfo") or die(mysql_error());

while($wow = mysql_fetch_array($srlt)){
    $suesno =trim($wow["subscriber"]);
    $porting = trim($wow["terminationid"]);  

    if(($suesno == $snumber and $porting == $port_info )){

    }
}

$ suesno和$snumber的比较正在工作。 $suesno作为6661235存储在数据库中。但是$porting$port_info的比较无法正常工作。并且$porting作为USER00301500030

存储在数据库中

1 个答案:

答案 0 :(得分:0)

尝试在&if条件下使用&&代替