I have a database set up with one table called Number. I am trying to query the database with a search button to display the searched results. In my code I have connected to my database but I am having trouble to display any results that are searched. Here is the code I am using after I connect:
$SQL = "SELECT * FROM Number WHERE Number LIKE '%$box%' LIMIT 10";
$result = mysql_query($SQL) or die(mysql_error("Error in query"));
while($row = mysql_fetch_array($result))
{
echo $row['Number'];
}
?>
If anyone has any better code or know how to add this search feature to my site that would be great. Thanks