Forum Moderators: coopster

Message Too Old, No Replies

Error in form processer

Error in form processer

         

Mark1982

1:40 pm on Jul 25, 2008 (gmt 0)

10+ Year Member



Hi,

I had an existing form that used to work and i have just moved it to a new site and it is bringing up the following error:

" . $headersep . "Reply-To: \"$MorrisonFirstName $MorrisonSurname\" <$MorrisonContactEmail>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header( "Location: $thankyouurl" ); exit ; ?>

The code is as follows:
===================================================================
<?

error_reporting(E_ALL);

ini_set("SMTP","mail.example.com"); ini_set("smtp_port","25");

$mailto = 'mark@example.com' ;
$subject = "THE MORRISON BOOKING ENQUIRY ¦¦ REF: UN/CEFACT FORUM" ;

$formurl = "http://www.example.com/UNCEFACT_Forum/MorrisonHotelReservationPage.html" ;
$errorurl = "http://www.example.com/UNCEFACT_Forum/registrationError.html" ;
$thankyouurl = "http://www.example.com/UNCEFACT_Forum/MorrisonBookingReceived.html" ;

$uself = 1;

// -------------------- END OF CONFIGURABLE SECTION ---------------

$headersep = (!isset( $uself ) ¦¦ ($uself == 0)) ? "\r\n" : "\n" ;

$MorrisonTitle = $_POST['MorrisonTitle'] ;
$MorrisonFirstName = $_POST['MorrisonFirstName'] ;
$MorrisonSurname = $_POST['MorrisonSurname'] ;
$MorrisonArrivalDay = $_POST['MorrisonArrivalDay'] ;
$MorrisonArrivalMonth = $_POST['MorrisonArrivalMonth'] ;
$MorrisonDepartureDay = $_POST['MorrisonDepartureDay'] ;
$MorrisonDepartureMonth = $_POST['MorrisonDepartureMonth'] ;
$MorrisonSingleRooms = $_POST['MorrisonSingleRooms'] ;
$MorrisonTwinRooms = $_POST['MorrisonTwinRooms'] ;
$MorrisonDoubleRooms = $_POST['MorrisonDoubleRooms'] ;

$MorrisonContactNumber = $_POST['MorrisonContactNumber'] ;
$MorrisonContactEmail = $_POST['MorrisonContactEmail'] ;

if (!isset($_POST['MorrisonContactEmail'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($MorrisonContactEmail)) {
header( "Location: $errorurl" );
exit ;
}

if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}

$messageproper =

"------------------------- THE MORRISON HOTEL BOOKING ENQUIRY -------------------------\n\n" .

"Booking Ref:Custom Ireland ¦ UN/CEFACT Forum\n" .
"\n" .
"Title: $MorrisonTitle\n" .
"FirstName: $MorrisonFirstName\n" .
"Surname: $MorrisonSurname\n" .

"\n" .
"Date of Arrival: $MorrisonArrivalDay $MorrisonArrivalMonth\n" .
"Date of Departure: $MorrisonDepartureDay $MorrisonDepartureMonth\n" .

"\n" .
"Number of Rooms: \n" .
"Singles: $MorrisonSingleRooms\n" .
"Twins: $MorrisonTwinRooms\n" .
"Doubles: $MorrisonDoubleRooms\n" .

"\n" .
"Contact Number: $MorrisonContactNumber\n" .
"Contact Email: $MorrisonContactEmail\n" .

"Rate:Single Room with Breakfast €195.00\n" .
"Double Room with Breakfast €215.00\n" .

"\n\n------------------------------------------------------------\n" ;

ini_set("sendmail_from",$MorrisonContactEmail);

mail($mailto, $subject, $messageproper,"From: \"$MorrisonFirstName $MorrisonSurname\" <$MorrisonContactEmail>" . $headersep . "Reply-To: \"$MorrisonFirstName $MorrisonSurname\" <$MorrisonContactEmail>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
header( "Location: $thankyouurl" );
exit ;

?>

=======================================================================

Anyone any ideas?

Thanks

[edited by: dreamcatcher at 2:35 pm (utc) on July 25, 2008]
[edit reason] use example.com. Thanks. [/edit]

eelixduppy

4:24 pm on Jul 26, 2008 (gmt 0)



Hello and Welcome to WebmasterWorld!

This issue is wierd at first glance. It seems to stop parsing the PHP at one random point in your script. This isn't an error message, by the way, bu rather just the source being output. How about trying the full open tag instead of the short tag. Replace PHP's opening tag with

<?php
and see if that helps.