PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old May 8th, 2008, 03:38 PM
desktop_doodle desktop_doodle is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 21 desktop_doodle User rank is Corporal (100 - 500 Reputation Level)desktop_doodle User rank is Corporal (100 - 500 Reputation Level)desktop_doodle User rank is Corporal (100 - 500 Reputation Level)desktop_doodle User rank is Corporal (100 - 500 Reputation Level) 
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

Reply With Quote
  #2  
Old May 8th, 2008, 06:30 PM
jakenoble's Avatar
jakenoble jakenoble is offline
System.out.println("eh?");
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2004
Location: Derbyshire
Posts: 859 jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level)jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level)jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level)jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level)jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level)jakenoble User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 5 Days 17 h 57 m 46 sec
Reputation Power: 25
Send a message via MSN to jakenoble
Are you sure your site can use both PHP and ASP?

Reply With Quote
  #3  
Old May 9th, 2008, 06:01 AM
desktop_doodle desktop_doodle is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 21 desktop_doodle User rank is Corporal (100 - 500 Reputation Level)desktop_doodle User rank is Corporal (100 - 500 Reputation Level)desktop_doodle User rank is Corporal (100 - 500 Reputation Level)desktop_doodle User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 11 m 41 sec
Reputation Power: 0
Quote:
Originally Posted by jakenoble
Are you sure your site can use both PHP and ASP?


Hi Jake,

Thanks for the reply. Yes, for example, there are some static .html pages on the same site which use the exact same form/script and they work fine - it's just when the form is used on a dynamic page.

Any ideas? I've just checked to see which version of PHP the server uses - and it is 4.3.10 - so perhaps it's just a case of updating it? As it doesnt run Apache, I can't check the .htaccess file.

Any ideas - as I'm completely stumped! -or can anyone proved an alternative script for form sending that works with ASP?

Many thansk in advance,
Regards,
Mike

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - Asp intefering with Php feedback form script -need help!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway