owen
-
Posts
11 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by owen
-
-
That would be amazing, cheersSorry about that. At home I think I still have a CGI script to process forms. It's really simple but it's been so long since I did that. I could always send it to you? -
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
-
FOrms again
in PHP
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
-
Cheers Guys
-
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 helpYou can use the GET method for any HTML form no matter what scripting language you use to process it. The data will get passed in the url.if you are using PHP you would get the data like this.Say one of your fields in the form is named 'firstname' the get method will send the data in the url like thisyourpage.php?firstname=somevalueThen in PHP the variable name would be $firstname instead of using $_POST['firstname']. PHP grabs querystring into varaibles for you names the same as in the url. -
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 madI don't think so... I've only used the get method with a cgi script.Weclome for the help -
Cheers I'll have a look. Do you know if can use the 'get' method in this situation?
-
In the address bar it says it has gone to the php page.It says 405 method not allowed
-
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??????
-
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
emailing forms without asp
in HTML/XHTML
Posted
Thanks alot