-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.php
64 lines (53 loc) · 2.24 KB
/
form.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Form validation</title>
<script type="text/javascript" src="vvjquery.js"></script>
<script type="text/javascript" src="vvjquery.validate.js"></script>
<script type="text/javascript" src="vvadditional-methods.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#form").validate({
rules: {
phone: {
phoneUS: true
}
}
});
});
</script>
<style media="screen">
body {font-family: Arial; font-size: 12px;}
fieldset {border: 0;}
label {display: block; width: 180px; float: left; clear: both; margin-top: 10px;}
label em {display: block; float: right; padding-right: 8px; color: red;}
textarea, input {float: left; width: 220px; padding: 2px;}
textarea {height: 180px;}
#submit {margin-left: 180px; clear: both; width: 100px;}
label.error {float: left; color: red; clear: none; width: 200px; padding-left: 10px; font-size: 11px;}
.required_msg {padding-left: 180px; clear: both; float: left; color: red;}
</style>
</head>
<body>
<form action="" method="post" id="form">
<fieldset>
<label for="name">Name:</label>
<input type="text" name="name" id="name" class="required" value="<?php echo $form['name'];?>">
<?php echo $error['name']; ?>
<label for="phone">Phone (212-999-0983): </label>
<input type="text" name="phone" id="phone" class="required" value="<?php echo $form['phone'];?>">
<?php echo $error['phone']; ?>
<label for="fax">Fax:</label>
<input type="text" name="fax" id="fax" value="<?php echo $form['fax'];?>">
<label for="email">Email:</label>
<input type="text" name="email" id="email" class="required email" value="<?php echo $form['email'];?>">
<?php echo $error['email']; ?>
<label for="comments">Comments:</label>
<textarea type="text" name="comments" id="comments"><?php echo $form['comments'];?></textarea>
<p class="required_msg">* required fields</p>
<input type="submit" name="submit" id="submit"><br>
</fieldset>
</form>
</body>
</html>