akalorik Posted January 12, 2005 Posted January 12, 2005 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? Quote
TCH-Dick Posted January 12, 2005 Posted January 12, 2005 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 Quote
akalorik Posted January 12, 2005 Author Posted January 12, 2005 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 <{POST_SNAPBACK}> 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!!!!! Quote
akalorik Posted January 12, 2005 Author Posted January 12, 2005 Can you post the script here? <{POST_SNAPBACK}> 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>; ?> Quote
TCH-Dick Posted January 12, 2005 Posted January 12, 2005 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>"; Quote
TCH-Rob Posted January 12, 2005 Posted January 12, 2005 The error is on line 45 yet I see only 43. Is that normal? Quote
akalorik Posted January 12, 2005 Author Posted January 12, 2005 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>"; <{POST_SNAPBACK}> All better now. That was a totally lame mistake I made! Thanks Dick, I really appreciate your help!!! Quote
TCH-Dick Posted January 12, 2005 Posted January 12, 2005 No problem and let us know if you need anything else. Quote
TCH-Dick Posted January 12, 2005 Posted January 12, 2005 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?) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.