can someone tell me why my php code wont process

The following php doesnt work correctly and i cant figure out why. all it loads is:

/Order_Form.html?NAME=&ADDRESS=&TOWN=&POSTCODE=&PHONE= etc etc

can anyone help? it should load the confirm page and send me the order email

<?php // The message $message = "Full Name: $_POST[NAME]\n Address: $_POST[ADDRESS]\n Town: $_POST[TOWN]\n Post Code: $_POST[POSTCODE]\n Phone Number: $_POST[PHONE]\n Email: $_POST[email]\n\n"; $message .= "Page Number: $_POST[PageNumber]\n Product Code: $_POST[ProductCode]\n Product Description: $_POST[Description]\n Price (£): $_POST[Price]\n Quantity: $_POST[Quantity]\n Total: $_POST[Total]\n\n"; $message .= "Page Number: $_POST[PageNumber2]\n Product Code: $_POST[ProductCode2]\n Product Description: $_POST[Description2]\n Price (£): $_POST[Price2]\n Quantity: $_POST[Quantity2]\n Total: $_POST[Total2]\n\n"; $message .= "Page Number: $_POST[PageNumber3]\n Product Code: $_POST[ProductCode3]\n Product Description: $_POST[Description3]\n Price (£): $_POST[Price3]\n Quantity: $_POST[Quantity3]\n Total: $_POST[Total3]\n\n"; $message .= "Page Number: $_POST[PageNumber4]\n Product Code: $_POST[ProductCode4]\n Product Description: $_POST[Description4]\n Price (£): $_POST[Price4]\n Quantity: $_POST[Quantity4]\n Total: $_POST[Total4]\n\n"; $message .= "Page Number: $_POST[PageNumber5]\n Product Code: $_POST[ProductCode5]\n Product Description: $_POST[Description5]\n Price (£): $_POST[Price5]\n Quantity: $_POST[Quantity5]\n Total: $_POST[Total5]\n\n"; $message .= "Page Number: $_POST[PageNumber6]\n Product Code: $_POST[ProductCode6]\n Product Description: $_POST[Description6]\n Price (£): $_POST[Price6]\n Quantity: $_POST[Quantity6]\n Total: $_POST[Total6]\n\n"; $message .= "Page Number: $_POST[PageNumber7]\n Product Code: $_POST[ProductCode7]\n Product Description: $_POST[Description7]\n Price (£): $_POST[Price7]\n Quantity: $_POST[Quantity7]\n Total: $_POST[Total7]\n\n"; $message .= "Page Number: $_POST[PageNumber8]\n Product Code: $_POST[ProductCode8]\n Product Description: $_POST[Description8]\n Price (£): $_POST[Price8]\n Quantity: $_POST[Quantity8]\n Total: $_POST[Total8]\n\n"; $message .= "Page Number: $_POST[PageNumber9]\n Product Code: $_POST[ProductCode9]\n Product Description: $_POST[Description9]\n Price (£): $_POST[Price9]\n Quantity: $_POST[Quantity9]\n Total: $_POST[Total9]\n\n"; $message .= "Page Number: $_POST[PageNumber10]\n Product Code: $_POST[ProductCode10]\n Product Description: $_POST[Description10]\n Price (£): $_POST[Price10]\n Quantity: $_POST[Quantity10]\n Total: $_POST[Total10]\n\n"; $message .= "Grand Total: $_POST[GrandTotal]"; // Send $success = "/confirm.html"; if (mail('[email protected]', 'Online Order', $message)) { header('Location: ' . $success); exit(); } ?>
all it loads is: /Order_Form.html?NAME=&ADDRESS=&TOWN=&POSTCODE=&PHONE= etc etc

Problem is likely in your form, not in this php code. Is .html file type treated as php? Do you have line like this in your .htaccess:

AddHandler application/x-httpd-php .html
Sponsor our Newsletter | Privacy Policy | Terms of Service