On 6/13/2010 9:37 AM, Shawn McKenzie wrote:
On 06/13/2010 08:43 AM, Don Wieland wrote:
Hello,
I have a contact form with three fields, name, email, and comment, and a
CAPTCHA
I am doing some basic validation for empty fields but am getting a PHP
error when trying to redirect back to the original page with an ERROR,
It seems when my COMMENT field contains<BR>s, it generates the PHP
ERROR. No<BR?s works perfectly. Am I missing a function for the comment
that is necessary for the GET STRING return?
if($_POST['name'] AND $_POST['email'] AND $_POST['comment']) {
}else{
header("location: contactus.php?Error=Missing values in REQUIRED
FIELDS&name=".$_POST['name']."&email=".$_POST['email']."&comment=".$_POST['comment']);
exit();
}
session_start();
if($_SESSION['Captcha_Str'] != $_POST['scode']) {
echo "HI";
header("location: contactus.php?Error=You did not enter your SECURITY
CODE correctly. It is case
sensitive.&name=".$_POST['name']."&email=".$_POST['email']."&comment=".$_POST['comment']);
exit();
}
Don Wieland
D W D a t a C o n c e p t s
~~~~~~~~~~~~~~~~~~~~~~~~~
donw@xxxxxxxxxxxxxxxxxx
Direct Line - (949) 305-2771
Integrated data solutions to fit your business needs.
Need assistance in dialing in your FileMaker solution? Check out our
Developer Support Plan at:
http://www.dwdataconcepts.com/DevSup.html
Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro 9
or higher
http://www.appointment10.com
For a quick overview -
http://www.appointment10.com/Appt10_Promo/Overview.html
You still haven't given us what ERROR you receive, but you need to
urlencode() $_POST['comment'] and the other values in the URL query string.
echo "HI";
header(...
This part will cause an error since outputting anything will cause the
headers to be sent (unless output buffering is on). Once sent, the
headers cannot be modified.
You should also think about using urlencode on the values being sent in
the redirect URLs, or even using a code to reference each error.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php