Jump to content

Recommended Posts

Posted

I just moved my client's site to TCH because the other host started running PHP in safe mode and I was unable to use a PHP script for form-to-email processing that I have used for over a year. However it looks like I'm having a similar issue with TCH. When I submit the form I receive the following error:

 

Method Not Allowed

The requested method POST is not allowed for the URL /quote.html.

 

--------------------------------------------------------------------------------

 

Apache/1.3.33 Server at www.modernpropackaging.com Port 80

 

Any suggestions?

Posted
You have nothing set for action="". This causes the form to try to POST to itself. Try setting the action to point to QouteRequest.php

 

Thanks Dick. I added the Action line but then it was asking for a username and password so I moved the scripts out of the _private folder but now I'm getting this error:

 

Parse error: parse error, unexpected $ in /home/modernp/public_html/scripts/QuoteRequest.php on line 45

 

Help!!!!!

Posted
Can you post the script here?

 

Thanks for getting back to me on this so quickly!

 

Here it is:

 

<?php

$mailheaders = "From: webmaster@modernpropackaging.com\n";

$mailheaders .= "Reply-To: $Email\n";

 

$message = "QUOTE REQUESTOR INFORMATION\n";

$message .= "First Name:\n";

$message .= "$_POST[FirstName]\n";

$message .= "Last Name:\n";

$message .= "$_POST[LastName]\n";

$message .= "Company:\n";

$message .= "$_POST[Company]\n";

$message .= "Address:\n";

$message .= "$_POST[Address1]\n";

$message .= "Address:\n";

$message .= "$_POST[Address2]\n";

$message .= "City:\n";

$message .= "$_POST[City]\n";

$message .= "State:\n";

$message .= "$_POST[state]\n";

$message .= "Zip:\n";

$message .= "$_POST[Zip]\n";

$message .= "Phone:\n";

$message .= "$_POST[Phone]\n";

$message .= "Fax:\n";

$message .= "$_POST[Fax]\n";

$message .= "EMail Address:\n";

$message .= "$_POST\n\n";

$message .= "Website Address:\n";

$message .= "$_POST[Website]\n\n";

$message .= "Please describe your packaging project or product needs:\n";

$message .= "$_POST[Project]\n";

$message .= "Other request or additional comments:\n";

$message .= "$_POST[Comments]\n\n";

$message .= "Return requested information via:\n";

$message .= "$_POST[ResultsBy]\n\n";

 

$subject = "Quote Request";

 

mail("lori@juxtaposecreative.com", $subject, $message, $mailheaders);

 

echo "<Hi align=center>Thank You. $_POST[FirstName]</H1>";

echo "<P align=center>We will get back to you as soon as possible with the requested information.</p>;

?>

Posted

The only errors I see is

 

echo "Thank You. $_POST[FirstName]";

echo "

We will get back to you as soon as possible with the requested information.

;

should be

 

>echo "<H1 align=center>Thank You. $_POST[FirstName]</H1>";
echo "<P align=center>We will get back to you as soon as possible with the requested information.</p>";

Posted
The only errors I see is

 

echo "<Hi align=center>Thank You. $_POST[FirstName]</H1>";

echo "<P align=center>We will get back to you as soon as possible with the requested information.</p>;

should be

 

>echo "<H1 align=center>Thank You. $_POST[FirstName]</H1>";
echo "<P align=center>We will get back to you as soon as possible with the requested information.</p>";

 

All better now. That was a totally lame mistake I made! Thanks Dick, I really appreciate your help!!!

Posted
The error is on line 45 yet I see only 43.  Is that normal?

That was caused by that echo statement not being closed properly and there are probally spaces at the end of the script, so the error was spit out for what php thought was the end of that line. (OR something like that , Am I making any sense here?)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...