-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
78 lines (76 loc) · 3.13 KB
/
index.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
include 'connection.php';
if(isset($_POST['first']))
{
session_start();
$id = uniqid();
$uname = $_POST['uname'];
$age = $_POST['age'];
$weight = $_POST['weight'];
$height = $_POST['height'];
$gender =$_POST['gender'];
$_SESSION['id'] = $id;
$_SESSION['uname'] = $uname;
$_SESSION['age'] = $age;
$_SESSION['weight'] = $weight;
$_SESSION['height'] = $height;
$_SESSION['gender'] = $gender;
header("Location:Bmi.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Bmi-Form</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=Roboto:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link rel="stylesheet" href="style.css">
<script type="text/javascript" src='main.js'></script>
</head>
<body id="bdform">
<div class="container" id="form">
<div class="row">
<div class="Content">
<div id="Heading">
<p>Tell us about Yourself</p>
</div>
<form action="" method="post" id="form">
<div class="form-group">
<label for="usr">Name</label>
<input type="text" class="form-control" id="usr" name="uname" placeholder="Full Name">
</div>
<div class="form-group">
<label for="usr">Age</label>
<input type="number" min="18" max="80" class="form-control" id="usr" name="age" placeholder="Age" required>
</div>
<div class="form-group">
<label for="usr">Weight</label>
<input type="number" pattern="[0-9]{3}" maxlength="3" class="form-control" id="usr" name="weight" title="Weight should NOT > Three figures Eg.60 ,110" placeholder="Weight in Kg" required>
</div>
<div class="form-group">
<label for="usr">Height</label>
<input type="number" pattern="[0-9]{3}" maxlength="3" class="form-control" id="usr" name="height" placeholder="Height in cm" required>
</div>
<div class="form-group">
<label for="usr">Gender</label>
<select name="gender" style="width:300; height:35px; margin-left: 0px;" id="frm_select" required>
<option value="Male">Male</option>
<option value="female">Female</option>
</select>
</div>
<div id="button_form">
<button type="submit" id="form_sub" name="first">Submit</button>
</div>
</form>
</div>
</div>
</div>
</body>
</html>