-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetails.php
147 lines (127 loc) · 4.33 KB
/
details.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?php include('server.php') ?>
<!doctype html>
<head>
<style>
/* Style the header */
.header {
background-color: #f1f1f1;
padding: 20px;
text-align: center;
}
/* Style the top navigation bar */
.topnav {
overflow: hidden;
background-color: #333;
}
/* Style the topnav links */
.topnav a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
/* Change color on hover */
.topnav a:hover {
background-color: #ddd;
color: black;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
}
h1{
background:tomato;
font-family:bedrock;
}
.n{
padding: 70px 50px;
background-color:rgba(0.9,0.1,0.1,0.3) ;
width:300px;
hieght:100px;
margin:20px auto 10px;
border:1px solid black;
}
header {
background-color:grey;
text-align:center;
text-size:60px;
padding:3px;
}
</style>
<meta charset="UTF-8">
</head>
<html>
<body>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$("#txtName").keypress(function (e) {
var keyCode = e.keyCode || e.which;
$("#lblError").html("");
//Regex for Valid Characters i.e. Alphabets and Numbers.
var regex = /[A-Za-z 0-9]/;
//Validate TextBox value against the Regex.
var isValid = regex.test(String.fromCharCode(keyCode));
if (!isValid) {
$("#lblError").html("Only Alphabets and Numbers allowed and it's not allowed even enter button.");
}
return isValid;
});
});
$(function () {
$("#txt").keypress(function (e) {
var keyCode = e.keyCode || e.which;
$("#lblError").html("");
//Regex for Valid Characters i.e. Alphabets and Numbers.
var regex = /[A-Za-z 0-9]/;
//Validate TextBox value against the Regex.
var isValid = regex.test(String.fromCharCode(keyCode));
if (!isValid) {
$("#lblError").html("Only Alphabets and Numbers allowed and it's not allowed even enter button.");
}
return isValid;
});
});
$(document).ready(function(e){
$('#btnSubmit').click(function(){
var email = $('#Email').val();
var reg = /^([\w-\.]+@(?!gmail.com)(?!yahoo.com)(?!hotmail.com)(?!redif.com)(?!aol.com)([\w-]+\.)+[\w-]{2,4})?$/;
if (reg.test(email)){
return 0;
}else{
alert('gmail, yahoo, hotmail, redif, are not allowed to enter.');
return false;
}
});
});
</script>
<h1 style="text-align:center"> ENTER DATA FOR REGISTRATION </h1>
<form method="post" action="details.php" enctype="multipart/form-data">
<br><br><br>
<div class="n">
<span id="lblError"></span>
<label for="Cname"> Company Name: </label>
<input type="text" name="Cname" id="txt" title="Special char not allowed" required> </br> </br>
<label for="Email"> Email: </label>
<input type="text" id="Email" name="Email" required> </br> </br>
<label for="Mobile"> Mobile: </label>
<input type="tel" name="Mobile" pattern="[7-9]{1}[0-9]{9}"
title="Phone number with 7-9 and remaing 9 digit with 0-9" required> </br> </br>
<label for="Hrname"> HR name: </label>
<span id="lblError"></span>
<input type="text" name="Hrname" id="txtName" title="Special char not allowed" required> </br> </br>
<label for="Address"> Address: </label>
<input type="text" name="address" required> </br> </br>
<label for="File"> File: </label>
<input type="file" name="files[]" multiple required> </br> </br>
<label for="password"> Password: </label>
<input type="password" name="password" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters"required> </br> </br>
<button type="submit" value="submit" id="btnSubmit" name="enter"> submit </button>
</div>
</form>
</body>
</html>