-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconnection.php
More file actions
26 lines (25 loc) · 808 Bytes
/
Copy pathconnection.php
File metadata and controls
26 lines (25 loc) · 808 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= mysqli_connect("localhost","root","","data");
if(!$conn){
die("connection failed".mysqli_connect_error());
}
echo "successfull";
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$gender = $_POST['gender'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$adharcard = $_POST['adharcard'];
$pincode = $_POST['pincode'];
$state = $_POST['state'];
$interest = $_POST['interest'];
$query ="INSERT INTO registration(firstname,lastname,gender,phone,email,adharcard,pincode,state,interest)
VALUES('$firstname' ,'$lastname', '$gender' , '$phone' ,'$email' ,'$adharcard','$pincode','$state','$interest')";
$data=mysqli_query($conn , $query);
if($data)
{
echo "Data inserted successfully!!";
}else{
echo "Data inserted failed!!";
}
?>