forked from pragya-sharma03/Registration-Form
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp code
More file actions
36 lines (35 loc) · 934 Bytes
/
php code
File metadata and controls
36 lines (35 loc) · 934 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
27
28
29
30
31
32
33
34
35
36
<html>
<head>
<title></title>
</head>
<body>
Welcome <?php echo $_POST['fname'];?> <?php echo $_POST['lname'];?>!<br/>
Your Email-Id is <?php echo$_POST['email'];?><br/>
Your Phone no is <?php echo$_POST['no'];?><br/>
And your message is <?php echo$_POST['msg'];?><br/>
<?php echo$_POST['gen'];?><br/>
<?php echo$_POST['verify'];?>
<?php
$host="root";
$user="u502635093_sneh";
$pass="";
$db="u502635093_demo";
$conn = mysqli_connect($host, $user, $pass,$db);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
if(isset($_REQUEST['submit']))
{
$fname=$_REQUEST['fname'];
$lname=$_REQUEST['lname'];
$email=$_REQUEST['email'];
$no=$_REQUEST['no'];
$gender=$_REQUEST['gen'];
$verify=$_REQUEST['verify'];
mysqli_query( $conn,"insert into form(first_name,last_name,email,no,gender,verification)values($fname,$lname,$email,$no,$gender,$verify)");
}
echo "db created";
?>
</body>
</html>