我有一个表单,当用户提交表单时,他的 ip 就会被记录下来。当 2 个或多个 ips 匹配时,我需要一种方法,使用输出表仅对具有相同 ip 的行着色
<?php
// Connects to your Database
mysql_connect("localhost", "pp", "mygas13") or die(mysql_error());
mysql_select_db("pp") or die(mysql_error());
$data = mysql_query("SELECT * FROM userTable")
or die(mysql_error());
Print "<table border cellpadding=3>";
while($info = mysql_fetch_array( $data ))
{
Print "<tr>";
Print "<th>Name:</th> <td>".$info['nick'] . "</td> ";
Print "<th>Ip:</th> <td>".$info['ip'] . " </td></tr>";
}
Print "</table>";
?>