Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

IIS7 Contact form PHP script redirect issue

$
0
0

Hi,

I was wondering if someone could help me.

I've set up a simple online voting form (HTML) where the user pushes the submit button and it calls up a PHP script to send the data to my email address.

The issue I'm having is, the form works correctly and the user hits submit..... a 500 Error page appears BUT I receive the email with the data from the form.

I have a redirection code set in my PHP scrip but it obviously isn't working.

 Here is the code from my PHP script :

<?php

$name = $_POST['Name'];
$email = $_POST['Email'];
$Nominees = $_POST['Nominees'];
$formcontent = "From: $name \n Vote: $Nominees";
$recipient = my_email@myemail.com;
$subject = "Voting submission";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
header('Location: Thank_You.html');
exit()
?>  

Any help would be great as I've been pulling my hair out for 2 days trying to get it to show the redirection page!!!!!!

Thanks


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>