Name: DOMMIT FRONK 2012-11-21 22:04
Having some issues with a PHP page I'm working on.
For example, in the event the dumb user forgets to enter their email, my formmail.php runs this:
The resulting sentfail.php page outputs the correct error message, but destroys my CSS in the process. (I tried removing the embedded PHP - it works)
Embedded PHP:
What am I doing wrong?
For example, in the event the dumb user forgets to enter their email, my formmail.php runs this:
header('Location: sentfail.php/?error=email');The resulting sentfail.php page outputs the correct error message, but destroys my CSS in the process. (I tried removing the embedded PHP - it works)
Embedded PHP:
<?php
$error = $_GET['error'];
switch((string)$error)
{
case "email":
print("<h2>Your Message wasn't sent, please enter your email.</h2>");
break;
case "name":
print("<h2>Your Message wasn't sent, please enter your name.</h2>");
break;
case "message":
print("<h2>Your Message wasn't sent, please enter your message.</h2>");
break;
case "contact":
print("<h2>Your Message wasn't sent, please check that you have correctly entered the required information.</h2>");
break;
case "filetype":
print("<h2>The file you attempted to upload is not allowed.</h2>");
break;
case "filesize":
print("<h2>The file you attempted to upload is too large.</h2>");
break;
case "fileupload":
print("<h2>There was an error during the file upload. Please try again.</h2>");
break;
case "order":
print("<h2>Your Order wasn't sent, please check that you have correctly entered the required information.</h2>");
break;
default:
print("<h2>Your Message wasn't sent, please check that you have correctly entered the required information.</h2>");
break;
}
?>What am I doing wrong?