-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_gallery.php
More file actions
50 lines (49 loc) · 1.81 KB
/
Copy pathadd_gallery.php
File metadata and controls
50 lines (49 loc) · 1.81 KB
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
<?php include 'includes/config.php'; ?>
<div id="carea">
<h1>Add Gallery!</h1>
<div id="fields">
<div class="sep"></div>
<br>
<div class="admin-form">
<?php
if (isset($_SESSION['email'])) {
?>
<form action="add_gallery_action.php" method="post" enctype='multipart/form-data'>
<div>
<?php
$member=getMemberId($_SESSION['email']);
$query = "SELECT * FROM hostels where owner_id='".$member."'";
$result = $db->query($query);
if (!empty($result)) {
?>
<select name="hostel_id">
<?php
while ($item = mysqli_fetch_assoc($result)) {?>
<option value="<?php echo $item['id'] ?>">
<?php echo $item['hostel_name'] ?>
</option>
<?php } ?>
</select>
<?php
}
?>
</div>
<div id="name_input">
<input type="file" name="userfile[]" id="img-input" multiple="multiple" required>
</div>
<div id="name_input">
<button type="submit" name="addgallery">Add Package</button>
</div>
</form>
<?php
}
else
{
?>
<p>Not Logged In!</p>
<?php
}
?>
</div>
<div>
<div>