-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimages.php
More file actions
26 lines (22 loc) · 867 Bytes
/
images.php
File metadata and controls
26 lines (22 loc) · 867 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Images List</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="img-container">
<?php
$db = new PDO('mysql:host=phpmyadmin.cmosonfcmrx6.eu-west-1.rds.amazonaws.com;dbname=images', 'root', 'rootroot');
$getImages = $db->query("SELECT filename FROM images");
$Imageslist = $getImages->fetchAll();
for($i = 0; $i < count($Imageslist); $i++) {
echo "<div class='image'><img src='https://s3-eu-west-1.amazonaws.com/com-rosettahub-default-nejmeddine.mannai/".$Imageslist[$i]['filename']."'></div>";
}
?>
</div>
</body>
</html>