PDA

View Full Version : A little PHP/javascript (??) help



claudiamorgan
09-26-2008, 04:05 PM
I'm using a mailcode script from http://www.myphpscripts.net/ to stop spambots from using my form. When the form is submitted I would like it to go to my page http://www.claudiamorgan.us/thanks.html but right now it just writes "Thank You! Your message has been submitted.'

Here's the code:

else if ($formval != 1 && $emailval == 1) {
if ($bademail != true) {
mail($to, $subject, $msg, $headers);
$results[] = 'Thank You! Your message has been submitted.';
}


(the code can be found at http://www.claudiamorgan.us/contact/contact.php)

Can anyone help

arnb
09-27-2008, 07:30 AM
If nothing else was sent prior to your thank you message
you should be able to replace it with a header statement. Dont echo or print $results in this case

// $results[] = 'Thank You! Your message has beeb submitted';
header( 'Location: www.claudiamorgan.us/thanks.html' );

alemcherry
10-04-2008, 09:54 AM
If nothing else was sent prior to your thank you message
you should be able to replace it with a header statement. Dont echo or print $results in this case

// $results[] = 'Thank You! Your message has beeb submitted';
header( 'Location: www.claudiamorgan.us/thanks.html' );

I guess you will have to make it:

header( 'Location: http://www.claudiamorgan.us/thanks.html' );