Heres the code:
Code: Select all
<?php
mysql_connect ( 'localhost', 'root', "", 'k00127082')
or die (mysql_error());mysql_select_db ("k00127082");
$term = $_POST['term'];
$sql = mysql_query("select * from products where product_name like '%$term%' ");
while ($row = mysql_fetch_array($sql))
{
echo '<table>';
echo '<tr>';
echo '<br/> Product Name: '.$row['product_name'];
echo '<br/> product description: '.$row['product_description'];
echo '<br/> product price: €'.$row['price'];
echo '<br/> Image: '.$row['image'];
echo '<br/><br/>';
echo '</tr>';
echo '</table>';
}
?>