View difference between Paste ID: g78eMqR5 and T3K94UKD
SHOW: | | - or go back to the newest paste.
1
2
<?php
3
$servername = "localhost";
4
$username = "root";
5
$password = "";
6
$dbname = "joes_hot_spot";
7
 
8
// Create connection
9
$conn = mysqli_connect($servername, $username, $password, $dbname);
10
// Check connection
11
if (!$conn) {
12
    die("Connection failed: " . mysqli_connect_error());
13
}
14
 
15
$sql = "SELECT * FROM menu_item";
16
$result = mysqli_query($conn, $sql);
17
18
19
if (mysqli_num_rows($result) > 0) {
20
echo " <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">";
21
    // output data of each row
22-
        echo $row['item_name'] . " ";
22+
23-
        echo $row['Item_ID'] . " ";
23+
		echo " <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4"> ";
24-
        echo $row['Item_type'] . " ";
24+
			echo "<div class="menu-item">;
25-
        echo $row['Item_price'] . " ";
25+
				echo "<img src='" .$row['item_picture'] . "'></img> <br> ";
26-
        echo $row['Item_description'] . " ";
26+
		        echo $row['item_name'] . " <br>";
27-
		echo "<img src='" .$row['item_picture'] . "' style='height:200px; width:200px;' ></img> </br> ";
27+
        		echo $row['Item_ID'] . " <br>";
28
		        echo $row['Item_type'] . " <br> ";
29
        		echo $row['Item_price'] . " <br> ";
30
		        echo $row['Item_description'] . " ";
31
			echo "</div>";
32
		
33
    }
34
	echo "</div>";
35
} else {
36
    echo "0 results";
37
}
38
 
39
mysqli_close($conn);
40
?>