Лабораторная работа: XMLHttpRequest (AJAX)
$result = mysql_query($sql);
print "Найдено по запросу: ". mysql_num_rows($result);
/**
* Если есть ряды, выводим таблицу
*/
if (mysql_num_rows($result) > 0) {
print "<table>";
print "<tr>";
print "<td>NickName</td>";
print "<td>RealName</td>";
print "<td>E-mail</td>";
print "</tr>";
$get = $_GET ["search"] ;
while ($row = mysql_fetch_array($result)) {
print "<tr>";
print "<td>";
print ($row ["unick"] ? preg_replace("/($get) /i", "<font color='red'>1</font>", $row ["unick"]):" ");
print "</td>";
print "<td>($row ["urealname"] ? $row ["urealname"]: " ") </td>";
print "<td>$row ["umail"] </td>";
print "</tr>";
}
print "</table>";
}
? >