标签:where color top echo amp utf8 pos ber rect
<?php $con = mysql_connect( "127.0.0.1", "xxxx", "password" ); mysql_query("set names ‘utf8‘ "); mysql_query("set character_set_client=utf8"); mysql_query("set character_set_results=utf8"); if ( $con ) { $tag = mysql_select_db( "sql_name", $con ); if ( $tag ) { $Haoma = $_POST[ "haoma" ]; $trueHtml =""; $row=mysql_fetch_array(mysql_query( "SELECT * FROM `sqlform` where `haoma` = ‘".$Haoma."‘ ")); $sqlhaoma = $row[‘haoma‘]; $sqlshiyong = $row[‘shiyong‘]; $sqlshuoming = $row[‘shuoming‘]; //var_dump($row); if($sqlhaoma == $Haoma){ $trueHtml = "<div class=‘result correct‘>"; $trueHtml .=" <img src=‘/images/correct.png‘ style=‘zoom:2;margin-top:0.5em;margin-bottom:0.5em;‘>"; $trueHtml .= " <p>"; $trueHtml .= "<b>"; $trueHtml.="查询结果:"; $trueHtml.="</b>"; $trueHtml.="<span>"; $trueHtml.="<em class=‘number‘>"; $trueHtml.="$sqlhaoma"; $trueHtml.="</em>是真管理号,可信任!</span></p>"; $trueHtml.=" <p><b>使用人:</b><span>"; $trueHtml.="$sqlshiyong"; $trueHtml.="</span></p>"; $trueHtml .="<p><b>特别说明:</b><span>$sqlshuoming</span></p>"; $trueHtml.="<p><a href=‘/jiarushequn‘>您还可直接联系各位管理的最新QQ >></a></p>"; $trueHtml .= "</div>"; }else{ $trueHtml ="<div class=‘result error‘>"; $trueHtml.="<img src=‘/images/error.png‘ style=‘zoom:2;margin-top:0.5em;margin-bottom:0.5em;‘>"; $trueHtml.=" <p><b>查询结果:</b><span><em class=‘number‘>$Haoma</em>是假管理号,不可信任<span></span></span></p>"; $trueHtml.="<p><b>使用人:</b><span>无</span></p>"; $trueHtml.="<p><b>特别说明:</b><span>请勿相信此人,以免上当受骗</span></p>"; $trueHtml.="<p><a href=‘/jiarushequn‘>您还可直接联系各位管理的最新QQ >></a></p>"; $trueHtml.="</div>"; } } else { echo( 1 ); } } else { echo( 2 ); } ?>
在html中,对应的显示的地方直接用$trueHtml代替
<div class="content" id="trueContent" > <?php echo $trueHtml;?> </div>
标签:where color top echo amp utf8 pos ber rect
原文地址:https://www.cnblogs.com/html5redbird/p/11563359.html