-
Notifications
You must be signed in to change notification settings - Fork 0
/
add.php
36 lines (27 loc) · 1.3 KB
/
add.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
<?php
$sever = "localhost";
$username = "root";
$password = "";
$dbname = "campusmanage";
$con = mysqli_connect($sever, $username, $password, $dbname);
if($_SERVER['REQUEST_METHOD'] ==='POST')
{
$eventname=$_POST['eventname'];
$datew=$_POST['datew'];
$timew=$_POST['timew'];
$venue=$_POST['venue'];
$sql = "insert into addeve(eventname,datew,timew,venue) values ('$eventname','$datew','$timew','$venue')";
$result=mysqli_query($con,$sql);
if($result)
{
echo "GO back and go to view event section to view your entered events";
}
else{
echo "query failed!";
}
}
else
{
die(mysqli_error($con));
}
?>