
May 8th, 2008, 03:38 PM
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 21
  
Time spent in forums: 7 h 11 m 41 sec
Reputation Power: 0
|
|
|
PHP-General - Asp intefering with Php feedback form script -need help!
Hi,
I have the following script for a feedback form on a site with dynamic content. I have used the script before on several sites with static content and had no problems - however the script now wont work as it appeard that the ASP behind the dynamic content is interfering with the PHP script - I've no idea why or what is causing it - any help please?????
The script is as follows:
Code:
<?php
$mailto = 'desktop_doodle@hotmail.com' ;
$subject = "Amnesty Form" ;
$formurl = "http://www.taxenquiry.co.uk/default.aspx?pageId=611" ;
$errorurl = "http://www.taxenquiry.co.uk/default.aspx?pageId=612" ;
$thankyouurl = "http://www.taxenquiry.co.uk/default.aspx?pageId=526" ;
$uself = 1;
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) ) {
header( "Location: $errorurl" );
exit ;
}
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------------------------------------------\n" .
"Name of sender: $name\n" .
"Email of sender: $email\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper,
"From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.08" );
header( "Location: $thankyouurl" );
exit ;
?>
I have emailed the creator of the script who assures me that the issue is not caused by the dynamic content per se - but by the ASP behind it. The script doesn't know and doesn't care that they are dynamic pages and should work regardless.
Can anyone help? My knowledge of both ASP and PHP is rather lacking and I seem unable to find a solution.
Many thanks in advance.
Regards,
Mike
|