-
Notifications
You must be signed in to change notification settings - Fork 38
/
acap-rega.php
executable file
·43 lines (34 loc) · 1.17 KB
/
acap-rega.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
<?php
session_start();
require 'connection.php';
$DB_NAME = 'acap';
$connection = new mysqli($DB_HOST, $DB_USER, $DB_PASS, $DB_NAME);
if ($connection->connect_error) {
// die("Connecton failed: ".$connection->connect_error);
die("It seems that we cannot talk to our DB right now. Please try again in a couple of minutes");
} else {
// echo "Connection Successful<br>";
}
@$name = $_POST["name"];
@$phone = $_POST["phoneno"];
@$email = $_POST["email"];
@$c_comp = $_POST["company"];
@$pc1 = $_POST["city"];
@$pc2 = $_POST["expertise"];
@$pc3 = $_POST["designation"];
@$year = $_POST["gradyear"];
@$cdc = $_POST["cdc"];
//$captcha_a=$_POST["captcha_a"];
if($name!='' && $phone != "" && $email != "" && $c_comp != "" && $pc1 != "" && $pc2 != "" && $pc3 != "" && $year != "" && $cdc != ""){
$sql = "INSERT INTO alumni (name,email,phone,current_company,current_designation,current_city,area_expertise,gradyear,cdc)
VALUES ('$name','$email','$phone','$c_comp','$pc3','$pc1','$pc2','$year','$cdc')";
echo '2';
if ($connection->query($sql)) {
$connection->close();
// header('Location: ./registration-complete.php');
exit;
} else {
echo "Error: " . $connection->error;
}
}
?>