Changeset - e2768399ec54
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 15 years ago 2010-10-26 00:52:46
ohnobinki@ohnopublishing.net
Add listing one's school to the feedback form.
2 files changed with 9 insertions and 4 deletions:
0 comments (0 inline, 0 general)
feedback-submit.php
Show inline comments
 
@@ -10,19 +10,22 @@
 

	
 

	
 
<?php
 
Page::session_start();
 

	
 
$ip = $_POST['ip'];
 
$httpagent = $_POST['httpagent'];
 
$fromdom = $_POST['fromdom'];
 
$nameis = $_POST['nameis'];
 
$visitormail = $_POST['visitormail'];
 
$school = $_POST['school'];
 
$school_id = isset($_SESSION['school']) ? $_SESSION['school'] : '';
 
$feedback = $_POST['feedback'];
 
$rating = $_POST['rating'];
 

	
 
if (eregi('http:', $feedback)) { 
 
  echo 'Please do not include URLs in your submission! Please click "back" and try again.';
 
}
 
if((!$visitormail == "") && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) {
 
if((!$visitormail == '') && (!strstr($visitormail, '@') || !strstr($visitormail, '.'))) {
 
  echo '<p>Please click "back" and enter valid e-mail address.</p>';
 
}
 
if(empty($nameis) || empty($feedback) || empty($visitormail)) {
 
@@ -33,7 +36,8 @@ if(empty($nameis) || empty($feedback) ||
 
$feedback = stripcslashes($feedback);
 

	
 
$message = date('l, F j, Y, g:i a') ."
 
From: $nameis ($visitormail) \n
 
From: $nameis ($visitormail)
 
School: $school ($school_id)\n
 
Rating: $rating 
 
Feedback: $feedback 
 
\n
feedback.php
Show inline comments
 
@@ -11,8 +11,9 @@
 
<input type="hidden" name="fromdom" value="<?php echo $fromdom ?>" />
 
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
 
<h2>Feedback Form</h2>
 
Name: <input type="text" name="nameis" size="20" /><br />
 
Email:&nbsp; <input type="text" name="visitormail" size="20" /><span class="graytext"> (if you want us to get back to you)</span><br />
 
<label for="nameis">Name: </label><input type="text" name="nameis" size="20" /><br />
 
<label for="visitormail">Email:&nbsp; </label><input type="text" name="visitormail" size="20" /> <span class="graytext">(if you want us to get back to you)</span><br />
 
<label for="school">School: </label><input type="text" name="school" size="20" /> <span class="graytext">(if relevant to your feedback)</span><br />
 

	
 

	
 
<br/> Overall Rating:<br/> <input checked="checked" name="rating" type="radio" value="Good" />Good <input name="rating" type="radio" value="Buggy" />Buggy  <input name="rating" type="radio" value="Needs more features" />Needs more features <input name="rating" type="radio" value="Don't know" />Don't Know
0 comments (0 inline, 0 general)