Well I am making something so that visitors can enter the habbo name or dj name and it will display the results (Like the Rare search on Habbox).
But when there isnt any thing been searched I want it to display "", which is working fine, but when I search something I keep getting this error:
My code isPHP Code:Fatal error: Cannot break/continue 1 level in /home/*****/public_html/folder/page.php on line 18
Line 18 is:PHP Code:<?php
include("../connector.php");
$search = ($_GET["search"]);
if($search == "") {
echo ("Please enter a DJ or Habbo Name.");
} else {
echo ("<table style=\"border-width: 0px\" width=\"450\" align=\"center\">");
$sql = mysql_query(" SELECT * FROM `users` WHERE `username` REGEXP CONVERT( _utf8 '$search' USING latin1 ) COLLATE latin1_swedish_ci OR `habboname` REGEXP CONVERT( _utf8 '$search' USING latin1 ) COLLATE latin1_swedish_ci");
while($rows = mysql_fetch_array($sql))
if(!$a) print ("<tr>");
$a++;
print ("<td style=\"border-style: none\" align=\"center\"><img src=\"http://www.habbo.com/habbo-imaging/avatarimage?user=$rows[habboname]&action=0&direction=3&head_direction=3&img_format=gif&gesture=0&size=l\"><br><b>$rows[habboname]</b><br><i>DJ $rows[username]</i></td>");
if($a!=4) continue;
print ("</tr>");
unset($a);
}
echo ("</tr></table>");
?>
PHP Code:if($a!=4) continue;





Reply With Quote

