-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess.php
More file actions
26 lines (23 loc) · 904 Bytes
/
process.php
File metadata and controls
26 lines (23 loc) · 904 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
<?php
$conn = new mysqli('localhost', 'karim', 'Karim@01', 'cfwa');
if(isset($_POST['register'])){
//$id = $_POST['uid'];
$name = $_POST['uname'];
$region = $_POST['region'];
$district = $_POST['district'];
$const = $_POST['const'];
$email = $_POST['email'];
$contact = $_POST['contact'];
$status = $_POST['status'];
$gender = $_POST['gender'];
$pass =$_POST['password'];
}
$sql = "INSERT INTO user(`uname`, `region`, `district`, `constituence`, `email`, `contact`, `status`, `password`, `gender`) VALUES ('$name', '$region', '$district', '$const', '$email', '$contact', '$status', '$pass', '$gender')";
$result = mysqli_query($conn, $sql);
if($result){
echo "successful";
header('Location: login.php');
} else {
echo "failed";
}
?>`