-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathballs.php
45 lines (36 loc) · 1.24 KB
/
balls.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<?php
require_once "pdo.php";
$stmt = $pdo->query("SELECT * FROM shop
WHERE name = 'Kipsta ball' or name = 'Adidas BALL'
");
?>
<table class="table table-hover"><tr><th>name</th><th>photo</th><th>price</th><th>description</th><th>Send to</th></tr>
<?php
while ($row = $stmt->fetch(PDO::FETCH_ASSOC))
{
echo "<tr><td>";
echo($row['name']);
echo "</td>";
echo "<td>";
?>
<img src="<?= $row['img'] ?>" width="165">
<?php
echo "</td>";
echo "<td>";
echo($row['price']);
echo "</td>";
echo "<td>";
echo($row['comment']);
echo "</td>";
echo "<td>";
echo'<a href="korzina.php"><button type="sumbit" >Send to</button></a>';
echo "</td>";
echo "</tr>";
}
?>
</table>