-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathserver.php
More file actions
36 lines (20 loc) · 737 Bytes
/
server.php
File metadata and controls
36 lines (20 loc) · 737 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
30
31
32
33
34
35
36
<?php
include('conn.php');
if($_POST['name']!=NULL){
$name=$_POST['name'];
$email=$_POST['email'];
$college=$_POST['college'];
$phone=$_POST['phone'];
$department=$_POST['department'];
$age=$_POST['age'];
$why1=$_POST['why1'];
$why2=$_POST['why2'];
$sql = "INSERT INTO ca (name,email,phone,college,department,age,why1,wh2)
VALUES ('$name', '$email','$phone', '$college','$department','$age','$why1','$why2')";
if ($conn->query($sql) === TRUE) {
header('Location: campus.php?result=Regestered Sucessfully');
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
?>