Jump to content

owen

Members
  • Posts

    11
  • Joined

  • Last visited

owen's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. That would be amazing, cheers
  2. Hi That link to the cgi thing didn't work, it kept failing when you pressed the download button. I've gone back to PHP here is a new script<?// $mailto - set to the email address you want the form// sent to, eg//$mailto = "youremailaddress@example.com" ;$mailto = 'owen@owenrimington.co.uk' ;// $subject - set to the Subject line of the email, eg//$subject = "Feedback Form" ;$subject = "ONK" ;// 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.madrugada-parties.co.uk/index.html" ;$errorurl = "http://www.madrugada-parties.co.uk/error.html" ;$thankyouurl = "http://www.madrugada-parties.co.uk/thankyou.html" ;$uself = 0;// -------------------- END OF CONFIGURABLE SECTION ---------------$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;$name = $_GET['name'] ;$email = $_GET['email'] ;$comments = $_GET['comments'] ;$http_referrer = getenv( "HTTP_REFERER" );if (!isset($_GET['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 ;?>Still doesn't work though
  3. owen

    FOrms again

    HiI am trying to set up a subscription button on website, The host server seems to have problems with the post method and sends a 405 method dissallowed message. I have tried using the get method but i'm still missing a trick somewhere because it's not working.Here is the html script<FORM METHOD="get" ACTION="http://www.madrugada-parties.co.uk/sendmail.php"> <INPUT Name="email" type="text" value="Email address" size="30"/> <INPUT TYPE="submit" class="submitbutton" VALUE="Join the Onk" alt="subscribe to mailing list" /> </FORM>and here's the php<? $email = $_GET['email'] ; mail( "owen@owenrimington.co.uk", "ONK", "From: $email" ); header( "Location: http://www.madrugada-parties.co.uk/thankyou.html" ); ?>Please help, thanks alot
  4. Hi aspnetguySorry you lost me a bit there. could you have a look at php posted above and tell me how it needs to change. i haven't used $_POST anywhere in the script. I'm new to all this. Thanks for your help
  5. Sorry to keep bothering you but is there an easy way to use CGI script, i haven't got a clue and it's driving me a bit mad
  6. Cheers I'll have a look. Do you know if can use the 'get' method in this situation?
  7. In the address bar it says it has gone to the php page.It says 405 method not allowed
  8. HiThanks for the advice, i tried looking at CGI scripts last night from Matts script archive but i couldn't understand any of it. I've found a simple PHP script but it seems to be causing problems still.The html of the form goes like this:<FORM METHOD="post" ACTION="sendmail.php"> <INPUT Name="email" type="text" value="Email address" size="30"/> <INPUT TYPE="submit" class="submitbutton" VALUE="Join the Onk" alt="subscribe to mailing list" /> </FORM>And the php - sendmail.php goes like this:<? $email = $_REQUEST['email'] ; mail( "owen@owenrimington.co.uk", "Feedback Form Results", "From: $email" ); header( "Location: http://www.madrugada-parties.co.uk/new/index.html" ); ?>When i use the post method the browser says method not allowed and when i use the get method the browser says page cannot be found??????
  9. HiI'm trying to set up a subscription to a mailing list button on a website. I've checked and the host server doesn't seem to support asp.What do i need to do to get a text box to to send it's contents to an email address?Please help
×
×
  • Create New...