-
Notifications
You must be signed in to change notification settings - Fork 0
/
tobeincluded.php
executable file
·39 lines (34 loc) · 1.8 KB
/
tobeincluded.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
<?php
$con=mysqli_connect("localhost","root","","INFORMATION");
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$checkbox = mysqli_real_escape_string($con, $_POST['licence']);
$permanent = mysqli_real_escape_string($con, $_POST['permanent']);
$permadate = mysqli_real_escape_string($con, $_POST['permadte']);
$prevrenew = mysqli_real_escape_string($con, $_POST['prevrenew']);
$fname = mysqli_real_escape_string($con, $_POST['FN']);
$mname = mysqli_real_escape_string($con, $_POST['MN']);
$lname = mysqli_real_escape_string($con, $_POST['LN']);
$FatherN = mysqli_real_escape_string($con, $_POST['FatherN']);
$MotherN = mysqli_real_escape_string($con, $_POST['MotherN']);
$age = mysqli_real_escape_string($con, $_POST['age']);
$BG = mysqli_real_escape_string($con, $_POST['BG']);
$Gender = mysqli_real_escape_string($con, $_POST['Gender']);
$phone = mysqli_real_escape_string($con, $_POST['phone']);
$DOB = mysqli_real_escape_string($con, $_POST['DOB']);
$birthplace = mysqli_real_escape_string($con, $_POST['POB']);
$houseno = mysqli_real_escape_string($con, $_POST['THN']);
$buildname = mysqli_real_escape_string($con, $_POST['TBN']);
$street = mysqli_real_escape_string($con, $_POST['TS']);
$city = mysqli_real_escape_string($con, $_POST['TC']);
$pincode = mysqli_real_escape_string($con, $_POST['TPCN']);
$Tstate = mysqli_real_escape_string($con, $_POST['state']);
$sql="INSERT INTO perma VALUES ('$checkbox', '$permanent', '$permadate', 'prevrenew', '$fname', '$mname', '$lname', '$FatherN', '$MotherN', '$age', '$BG', '$Gender', $phone, '$DOB',
'$birthplace', '$houseno', '$buildname', '$street', '$city', '$pincode', '$Tstate' )";
if (!mysqli_query($con,$sql)) {
die('Error: ' . mysqli_error($con));
}
echo "1 record added";
mysqli_close($con);
?>