-
Notifications
You must be signed in to change notification settings - Fork 0
/
slide.php
53 lines (51 loc) · 1.39 KB
/
slide.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
46
47
48
49
50
51
52
53
<?php
include('db.php');
include('header.php');
?>
<main>
<div><a href="./Add/slideAdd.php" class="fs-5 text-success text-decoration-none">Add Translation Content <i class="fa-regular fa-square-plus my-2"></i></a> </div>
<table class="table">
<thead class="container">
<tr>
<th scope="col">id</th>
<th scope="col">name</th>
<th scope="col">src</th>
<th scope="col">text</th>
<th scope="col">icon</th>
<th scope="col">link</th>
<th scope="col">workplace</th>
</tr>
</thead>
<tbody>
<?php
$sql='SELECT * FROM `slide` ';
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0){
while($row=mysqli_fetch_assoc($result)){
$id=$row['id'];
$name=$row['name'];
$src=$row['src'];
$text=$row['text'];
$link=$row['link'];
$icon=$row['icon'];
$workplace=$row['workplace'];
echo '
<tr>
<th scope="row">'.$id.'</th>
<td>'.$name.'</td>
<td><img src="image/'.$src.'" style="width:300px; height:300px;object-fit: contain;margin: 0 auto !important;"/></td>
<td>'.$text.'</td>
<td>'.$link.'</td>
<td>'.$icon.'</td>
<td>'.$workplace.'</td><td><a href="./update/slideUpdate.php?id='.$id.'" class="px-3 "><i class="fa-solid fa-pen-to-square text-success"></i></a></td>
</tr>
';
}
}
?>
</tbody>
</table>
</main>
<?php
include("footer.php");
?>