I was just wondering if there is anyway I can possibly change the way my contact.php is currently working. At the moment when someone fills up the form on my website they are left with a blank page with a 0 in the top left hand corner, and it really deteriorates the presentation value of the site. What I am looking for is to make the contact.php form do its process but afterwards have it redirect to another page on my website instead of simply sitting on that blank page.
Here is the script I am currently using for my contact.php form:
?php // contact.php
// ACTIVATE THESE TWO LINES TO SEE THE POST INFORMATION
// echo "<pre>";
// THE EMAIL ADDRESS THAT WILL RECEIVE THE MESSAGE
$m = 'email@example.com';
// A FUNCTION TO CLEAN UP THE INFORMATION AND AVOID BECOMING AN OPEN-RELAY FOR SPAM
= '#' // REGEX DELIMITER
. '[' // CHARACTER CLASS
. '^' // NEGATION - MATCH NONE OF THESE ACCEPTABLE CHARACTERS
. ' A-Z0-9_,?/@&*=()!\.\-'
. ']' // END OF CHARACTER CLASS
. '#' // REGEX DELIMITER
// ELIMINATE EXCESS WHITESPACE
$str = trim(preg_replace('#\s\s+#', ' ', $str));
// RETURN THE STRING - BAD CHARACTERS REPLACED WITH THE QUESTION MARK
return preg_replace($rgx, '?', $str);
// CLEAN AND FORMAT THE INFORMATION
$n = clean_string($_POST['n']);
$p = clean_string($_POST['p']);
$e = clean_string($_POST['e']);
$t = clean_string($_POST['t']);
$w = $_SERVER["HTTP_HOST"];
// CREATE THE EMAIL MESSAGE
$b = <<<MESSAGE
Job Description: $t
// SEND THE MESSAGE
mail($m, "Message from $w", $b);
And this is a link to the page which is using this.
Decon - Contact Page
Hopefully someone can help me out, this is thanks in advance.