-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconnect.php
More file actions
23 lines (22 loc) · 825 Bytes
/
connect.php
File metadata and controls
23 lines (22 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
$reg_num = $_POST['reg_num'];
$firstName = $_POST['firstName'];
$middleName = $_POST['middleName'];
$lastName = $_POST['lastName'];
$mobile = $_POST['mobile'];
$Email = $_POST['Email'];
$Password = $_POST['Password'];
$conn = new mysqli('localhost','root','','epalm');
if($conn->connect_error){
echo "$conn->connect_error";
die("Connection Failed : ". $conn->connect_error);
} else {
$stmt = $conn->prepare("insert into student(reg_num,firstName, middleName, lastName,mobile, Password, Email) values(?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("ssssiss",$reg_num,$firstName, $middleName, $lastName, $mobile, $Password, $Email);
$execeval = $stmt->execute();
$stmt->close();
$conn->close();
header("Location: registerview.php");
exit();
}
?>