corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Help with PHP Script?


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Help with PHP Script?
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
   13th Jun 07 at 21:47   View User's Profile U2U Member Reply With Quote

i have absolutly no knowlege of php programming so im hoping someone can help me out.
Im trying to create a simple contact form.
Ive uploaded the PHP file, added the html code, but when i click send i get:

quote:

Method Not Allowed
The requested method POST is not allowed for the URL /Designs/Site1/feedback.php.
0



The page is Here if you want to take a look.

PHP Code:
quote:

<?
/*
CHFEEDBACK.PHP Feedback Form PHP Script Ver 2.07
Generated by thesitewizard.com's Feedback Form Wizard.
Copyright 2000-2006 by Christopher Heng. All rights reserved.
thesitewizard and thefreecountry are trademarks of Christopher Heng.

$Id: phpscript.txt,v 1.8 2006/02/28 137:11 developer Exp $

Get the latest version, free, from:
http://www.thesitewizard.com/wizards/feedbackform.shtml

You can read the Frequently Asked Questions (FAQ) at:
http://www.thesitewizard.com/wizards/faq.shtml

I can be contacted at:
http://www.thesitewizard.com/feedback.php
Note that I do not normally respond to questions that have
already been answered in the FAQ, so *please* read the FAQ.

LICENCE TERMS

1. You may use this script on your website, with or
without modifications, free of charge.

2. You may NOT distribute or republish this script,
whether modified or not. The script can only be
distributed by the author, Christopher Heng.

3. THE SCRIPT AND ITS DOCUMENTATION ARE PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
IMPLIED WARRANTY OF MECHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. YOU AGREE TO BEAR ALL RISKS AND
LIABILITIES ARISING FROM THE USE OF THE SCRIPT,
ITS DOCUMENTATION AND THE INFORMATION PROVIDED BY THE
SCRIPTS AND THE DOCUMENTATION.

If you cannot agree to any of the above conditions, you
may not use the script.

Although it is NOT required, I would be most grateful
if you could also link to thesitewizard.com at:

http://www.thesitewizard.com/

*/

// ------------- CONFIGURABLE SECTION ------------------------

// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "youremailaddress@example.com" ;

$mailto = 'adam.venn@bridgesltd.co.uk' ;

// $subject - set to the Subject line of the email, eg
//$subject = "Feedback Form" ;

$subject = "Account Request" ;

// the pages to be displayed, eg
//$formurl = "http://www.example.com/feedback.html" ;
//$errorurl = "http://www.example.com/error.html" ;
//$thankyouurl = "http://www.example.com/thankyou.html" ;

$formurl = "http://www.emeraldsystemsltd.co.uk/account.html" ;
$errorurl = "http://www.emeraldsystemsltd.co.uk/error.html" ;
$thankyouurl = "http://www.emeraldsystemsltd.co.uk/thankyou.html" ;

$uself = 0;

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

$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.07" );
header( "Location: $thankyouurl" );
exit ;

?>




Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
14th Jun 07 at 07:45   View Garage View User's Profile U2U Member Reply With Quote

i think its the permissions on your webspace, as if you manually link to feedback.php it lets you download it, it should try and process it rather than download

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Maybe Ian or Tim will know this, but anyone else too... PaulW Geek Day 7 967
16th Dec 03 at 19:50
by Trucido
 
Interet techies! Macca_G Geek Day 3 954
9th Mar 04 at 14:48
by Macca_G
 
PHP dudes Dom Geek Day 3 799
29th Nov 06 at 21:21
by Dom
 
My SQL-Nearly there! Tom J Geek Day 31 3137
25th Dec 06 at 23:32
by Ian
 
Dodgy HTML/PHP/Table problem liamC Geek Day 9 779
24th Jan 07 at 19:37
by liamC
 

Corsa Sport » Message Board » Off Day » Geek Day » Help with PHP Script? 28 database queries in 0.0272579 seconds