-
Notifications
You must be signed in to change notification settings - Fork 1
/
feedback.php
80 lines (72 loc) · 1.88 KB
/
feedback.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
<html>
<head>
<title>Give your feedback</title>
<style>
.bc {
border: 1px solid #c6c7cc;
border-radius: 5px;
font: 14px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
overflow: hidden;
width: 640px;
margin-left: 28%;
margin-right:24%;
}
</style>
</head>
<link rel="stylesheet" type="text/css" href="css/posts.css">
<script>
function validateForm() {
var y = document.forms["myForm"]["feedback_mail"].value; /*value of entered email stored in y*/
if(y=="")
{
alert("Enter email");
return false;
}
var atpos = y.indexOf("@");
var dotpos = y.lastIndexOf(".");
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=y.length) { /*fist char cant be @,max 3 char gap b/w dot and @,3 char after dot*/
alert("Not a valid e-mail address");
return false;
}
var q = document.forms["myForm"]["feedback_descr"].value;
if(q == "")
{
alert("please enter your feedback");
return false;
}
}
</script>
<body>
<?php
include 'nvgbar.php';
?>
<br><br>
<div class="formstyle">
<center>
<h1>Give your Feedback !!</h1>
</center>
</div>
<div style="background-image:url('images/team.jpg'); background-repeat:repeat-x; border-radius:6px; width:100%; height:65%;">
<form method="post" action="feedbackpost.php" name="myForm" onsubmit="return validateForm()" class="bc">
<fieldset class="account-info">
<label>
Email
<input type="text" name="feedback_mail" width="40%">
</label>
<label>
Feedback
</label>
<textarea rows="12" cols="60" name="feedback_descr" class="textarea">
</textarea>
</fieldset>
<fieldset class="account-action">
<input class="btn" type="submit" name="submit" value="Submit" >
</fieldset>
</form>
</div>
<br>
<?php
include 'footer.php';
?>
</body>
</html>