-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
56 lines (54 loc) · 2.17 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
<?php
/**
* Created by PhpStorm.
* User: sumeet
* Date: 18/1/17
* Time: 1:05 AM
*/
?>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#9500ca"/>
<link rel="icon" type="image/png" href="css/favicon.png">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
function validate() {
name = $('#name').val();
phone = $('#phone-number').val();
console.log("name=" + name + "|phone=" + phone);
var match = phone.match(/\d/g);
return match != null && match.length === 10;
}
</script>
</head>
<body>
<div class="container">
<div class="row pt pl pr">
<form action="start.php" method="post" class="form-horizontal" onsubmit="return validate()">
<div class="form-group">
<label for="name" class="col-sm-2 control-label">Name</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="name" name="name" placeholder="Enter your Name" autofocus required>
</div>
</div>
<div class="form-group">
<label for="phone-number" class="col-sm-2 control-label">Phone Number</label>
<div class="col-sm-8">
<input type="text" maxlength="10" class="form-control" id="phone-number" name="phone-number"
placeholder="Enter Phone Number" required>
</div>
</div>
<div class="form-group text-center">
<div class="col-sm-offset-2 col-sm-8">
<input type="submit" class="btn btn-success btn-lg" value="Sign in">
</div>
</div>
</form>
</div>
</div>
</body>
</html>