Do you happen to have a quick validation script? just wanna make sure all the fields are there, and that the email address is in the right format!
PHP Code:
<?php
// Takes any fields that were sent to the browser and makes sure that that its not empty,
// and writes any field that is empty to an array to be printed later
foreach($_POST as $key => $value) {
if(!isset(trim($value))) {
$err_list[] = $key . " is a required field!";
}
}
// Validates email
$email = $_POST['email'];
if(!preg_match('/^[A-z0-9_\-]+\@(A-z0-9_-]+\.)+[A-z]{2,4}$/', $email); ) {
$err_list[] = $email. " is not a valid email!";
}
// Prints out all errors
echo "<ul>";
foreach($err_list as $err) {
echo "<li>" . $err . "</ul> \n";
}
echo "</ul>";
?>
<p><a href="history.go(-1)">Fix Errors</a></p>
where $_POST['email'] is the "name" of the email input field
Code:
<input name="email" type="text" value="" />
Bookmarks