-
Notifications
You must be signed in to change notification settings - Fork 1
/
fetcher.php
34 lines (26 loc) · 962 Bytes
/
fetcher.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
<?php
include 'dbh.php';
$im = "SELECT * FROM movies ORDER BY name ASC" ;
$stmt = $conn->prepare($im);
$stmt->execute();
$records = $stmt->get_result();
start:
$i=0;
echo"<div class='row'>";
while($result = $records->fetch_assoc()){
echo"<form action='movie.php' method='POST'>";
echo"<div class='col'>";
echo "<img src='uploads/".$result['imgpath']."' height='250' width='200' style='margin-top: 30px;margin-left:30px;margin-right:20px;' />";
echo"<div class='noob'>";
echo "<input type='submit' name='submit' class='btn btn-outline-info' style='display:block;width:200px;padding-bottom:15px;margin-bottom:30px;margin-left:30px;margin-right:20px;' value='".ucwords($result['name'])."'/>";
echo"</div>";
echo"</div>";
echo"</form>";
if ($i==4) {
echo"</div>";
goto start;
}
$i++;
}
echo"</div>";
?>