-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcessedit.php
More file actions
executable file
·29 lines (26 loc) · 887 Bytes
/
Copy pathProcessedit.php
File metadata and controls
executable file
·29 lines (26 loc) · 887 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
27
28
29
<?php
session_start() ;
if(!isset($_SESSION['user_id'])){
header("location: index.php") ;
}
include "connection.php" ;
//process the variables
$id = $_POST['eventid'] ;
$name = $_POST['event'] ;
$desc = $_POST['description'] ;
$info = $_POST['info'] ;
$clubtype = $_POST['type'] ;
$date = $_POST['date'] ;
$itime = $_POST['itime'] ;
$stime = $_POST['etime'] ;
$venue = $_POST['place'] ;
//prepare the query
$sql = "UPDATE events SET event_name='$name', description='$desc', info='$info', event_type='$clubtype', date='$date', time='$itime', end_time='$stime', venue='$venue' WHERE event_id='$id'" ;
$result = mysqli_query($link, $sql) ;
if(!$result){
echo "<h1>The query failed</h1>" ;
exit() ;
}else{
header("location: loggedin.php") ;
}
?>