/
candidatereg.php
54 lines (54 loc) · 1.4 KB
/
candidatereg.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<html>
<head>
<title>candidate registration</title>
</head>
<body>
<?php
$username="root";
$password="";
$database="evoting";
$server="127.0.0.1";
$myconn=mysqli_connection($server,$username,$password,$database);
if($myconn)
{
$candregid=$_GET['candreg_id'];//coming from page
$fname=$_GET['fname'];
$mame=$_GET['mname'];
$lname=$_GET['lname'];
$candfhname=$_GET['fhnamec'];
$mon=$_GET['mon'];
$gender=$_GET['gender'];
$candcard=$_GET['card'];
$candcardno=$_GET['cardno'];
$candaddress=$_GET['txtaddress'];
$country=$_GET['country'];
$state=$_GET['state'];
$city=$_GET['city'];
$pcode=$_GET['pcode'];
$candmobno=$_GET['mobileno'];
$candemailid=$_GET['email_id'];
$candpost=$_GET['candpost'];
/*$candphotos=$_GET['candphoto'];
$candsymbol=$_GET['candsymb'];*/
$SQL="Insert into candidateregis(candreg_id,fname,mname,lname,fhnamec,dob,gender,card,cardno,address,country,state,city,pincode_no,mobile_no,email_id,candpoistion)
values
(,'fname','mname','lname','candfhname','mon','gender','candcard','candcardno','candaddress','country','state','city',pcode,candmobno,'candemailid')";
$result=mysqli_query($myconn,$SQL);//query
if($result)
{
echo"<b>Record Inserted Successfully</b>";
}
else
{
echo "Record Insert Failed".mysqli_error($myconn);
}
mysqli_close($myconn);
//echo "<br> To insert another record, please <a href='inshome.html'>Click</a> here";
}
else
{
print "Database Not Found";
}
?>
</body>
</html>