-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditevents.php
91 lines (68 loc) · 2.5 KB
/
editevents.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
include ('.\includes\h.php');
$e_img = "";
$en=$_GET['id'];
//echo $en;
$server="localhost";
$user="root";
$password="";
$db="ac_db";
$con=mysqli_connect($server,$user,$password,$db) or die("connection failed");
$result = mysqli_query($con,"SELECT * from events where e_id='$en';");
$num_rows = mysqli_num_rows($result);
$i=0;
while ($row =mysqli_fetch_assoc($result)) {
$ename= $row['e_name'];
$venue= $row['venue'];
$date= $row['date'];
$fee= $row['parti_fee'];
$e_desc= $row['e_desc'];
$e_img=$row['e_img'];
?>
<?php } ?>
<form action="update.php?id=<?php echo $en?>" method="POST" style="margin-right: 10%; margin-left: 10%" enctype="multipart/form-data">
<h2 align="center">Edit information</h2><br><br>
<div class="form-group">
<label for="usr">Event name:</label>
<input type="text" class="form-control" id="e_name" name="e_name" value="<?php echo $ename ?>">
</div>
<label for="usr">Event Categories:</label>
<div class="checkbox">
<label><input type="radio" name="cat" value="Performing Arts">Performing Arts</label>
</div>
<div class="checkbox">
<label><input type="radio" name="cat" value="Sports">Sports Events</label>
</div>
<div class="checkbox">
<label><input type="radio" name="cat" value="College">College Events</label>
</div>
<div class="checkbox">
<label><input type="radio" name="cat" value="Educational" >Educational Events</label>
</div>
<div class="form-group ">
<label for="usr">Venue:</label>
<input type="text" class="form-control" id="venue" name="venue" value="<?php echo $venue; ?>" >
</div>
<div class="form-group ">
<label for="usr">Date of the event:</label>
<input type="date" class="form-control" id="date" name="date" value="<?php echo $date; ?>">
</div>
<div class="form-group ">
<label for="usr">Participation Fees (per participant):</label>
<input type="number" class="form-control" id="fees" name="fees" value="<?php echo $fee; ?>">
</div>
<div class = "form-group">
<img src="<?php echo $e_img;?>" height="100px" width="100px"/>
<label for="image">Attach an image of the event:</label>
<input type="file" name="img" ><br>
</div>
<div class="form-group">
<label for="Description">Description (Of individual event):</label>
<textarea class="form-control" rows="10" id="desc" name="desc" value="" maxlength="50"><?php echo $e_desc; ?></textarea>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</form>
<?php
include ('.\includes\f.php');
?>