-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindividual_event_db.php
40 lines (25 loc) · 1.11 KB
/
individual_event_db.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
<?php
require 'configure.php';
$password=$_POST[c_password];
$db_handle = mysqli_connect(DB_SERVER, DB_USER, DB_PASS );
if (!$db_handle)
{
die('Could not connect: ' . mysql_error());
}
$database = "CSR_DB";
$db_found = mysqli_select_db( $db_handle, $database );
if ($db_found) {
$query3=mysqli_query($db_handle,"INSERT INTO `individual_event` (`name`, `event_name`, `Edate`, `location`, `state`, `city`, `zip_code`,`country`, `contact_no`, `email`) VALUES ('$_POST[EOrg]','$_POST[Ename]', '$_POST[Edate]', '$_POST[Eloc]','$_POST[Estate]','$_POST[E_city]','$_POST[Ezip]','$_POST[Ecountry]', '$_POST[Econtact]', '$_POST[Eemail]')");
if($query3){
header('Location: user_indi_profile.php');
}
else{
echo "<script>alert('fill all segments')</script>";
header('Location: event_indi_reg.php');
}
}
else {
print "Database not found";
}
mysql_close($db_handle);
?>