Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- mysql_connect ("localhost", "shop_user","admin123");
- mysql_select_db ("shop");
- $search = $_POST['brand'];
- $sql = mysql_query("SELECT * FROM products WHERE brand like '%$search%' or productID like '%$search%' or description like '%$search%' or description like '%$search%'");
- echo "<center>";
- while ($result = mysql_fetch_array($sql)){
- echo "<div><a href = index.php?view=item&id=".$result['brand'].">";
- echo "<img src ='userfiles/".$result['picture']."'>";echo "</br>";
- echo $result['brand']; echo "</br>";
- echo $result['colour']; echo "</br>";
- echo "$"; echo $result['price']; echo "</br>";
- }
- echo "</center>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment