-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit-activity.php
More file actions
43 lines (37 loc) · 1.65 KB
/
edit-activity.php
File metadata and controls
43 lines (37 loc) · 1.65 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
<?php
session_start();
include "includes/head.php";
include "includes/navbars/navbar.php"; //contains include connection
//$_SESSION["user_id"] contains user id
$id = $_GET["id"];
$row = $db->activities[$id]; //Select row
?>
<body>
<h1 style="text-align: center;">Edit activity</h1>
<!-- Activity -->
<form action="edit-activity-validation.php?id=<?php echo $row["id"] ?>" method="post" enctype="multipart/form-data">
<div class="liner">
<div class="liner-left-part">
<img src="uploads/<?php echo $row["id"] ?>.jpg" alt="" class="liner-pic"> <br>
<input type="file" id="img" name="img" accept="image/*">
<div class="alert alert-light" role="alert">
<span> <small> (Keep this empty if you don't want to change the picture) </small></span>
</div>
</div>
<div class="liner-description">
<span><strong>Activity title:</strong></span> <br />
<input name="name" type="text" value="<?php echo $row["name"] ?>"><br>
<span><strong>Description:</strong></span> <br />
<textarea name="description" id="" cols="100" rows="10"><?php echo $row["description"] ?></textarea>
</div>
</div>
<!-- button -->
<div style="text-align: center; padding-left: 18px; ">
<input type="submit" class="btn btn-primary" value="Submit" style="width: 100%;">
<a href="activities.php?club_id=<?php echo $_SESSION["club_id"]; ?>">
<button class="btn btn-light navbtn">back</button>
</a>
</div>
</form>
</body>
</html>