Cygni Posted August 5, 2005 Posted August 5, 2005 (edited) Hello there, I am having a bit of trouble setting up my form using the cPanel's Formmail Clone. The script runs fine, but for documentation I am sent to Matt's Script Archive. However, since the script here is a clone, it does not seem to accept the same variables and options. I am trying to set a custom subject instead of the default 'No subject given', which looks (to me) really stupid on a form submission. html looks like this, according to documentation: <input type=hidden name="subject" value="Sent by My Form"> Anyone else had and fixed this little issue I couldn't find the answer performing a search on the forum, but since I'm a newbie, I may have done something wrong in the search as well... Thanks in advance... Cygni Edited August 5, 2005 by Cygni Quote
TCH-Andy Posted August 5, 2005 Posted August 5, 2005 Hi Cygni Because of continued problems with spammers attempting to exploit the cgi-sys install of formmail and cgiemail they have generally been disabled on all servers. It looks like there was part of it enabled on your server. There are a number of alternative, safe form mail scripts which can do the job you want, will be more secure, and will enable you to set the subject properly. Quote
Cygni Posted August 5, 2005 Author Posted August 5, 2005 There are a number of alternative, safe form mail scripts which can do the job you want, will be more secure, and will enable you to set the subject properly. <{POST_SNAPBACK}> Thanks Andy! I'll have a look around for the alternatives. Quote
stevesh Posted August 5, 2005 Posted August 5, 2005 I've used Phorm (www.phorm.com) for a couple of years now, and it does pretty much everything you can think of, form mailing-wise. Steve Quote
carbonize Posted August 8, 2005 Posted August 8, 2005 If all you are after is a script that takes an email address and message froma form then send it to your it would be easier, and more secure, to just write your own. If all yo uwant is something that simple email me with the requirments and I'll throw something together. Quote
Cygni Posted August 8, 2005 Author Posted August 8, 2005 If all yo uwant is something that simple email me with the requirments and I'll throw something together. <{POST_SNAPBACK}> Wow, that would be nice! I don't know a thing about scripting (yet)... I'm more into Flash and graphics and HTML than programming... What information do you need exactly? Quote
carbonize Posted August 8, 2005 Posted August 8, 2005 What do you want the scrpt to do. Is it a feedback form that just takes the results of a form and emails them to you? Quote
Cygni Posted August 8, 2005 Author Posted August 8, 2005 Yup. And I'm using a number of different form fields, like drop down menu's and stuff for it. I just don't like the standard 'No subject specified' line in the one I'm using now. f any of the scripts mentioned by other forum members can do that as well, what's the added worth and security in writing a new one? Or do you just like to script around for those who need assistance (or can't do it themselves at all, like me)? Quote
carbonize Posted August 8, 2005 Posted August 8, 2005 I just like to make things for practise. It's always a good form of practise to make stuff based upon others specifications as then you have rules and guidelines to stick to. Quote
carbonize Posted August 8, 2005 Posted August 8, 2005 A basic and quick generic form mailer. It just goes through all the submitted inputs and sends them in the form of inputname = inputvalue. You'd just usephp include to put the form where you want it and edit the obvious form in the script to however you want the form. ><?php $messagesubject = 'Submitted Form'; //Subject for emails $messageto = 'you@******'; // Where to send the emails to $messagefrom = 'rom@******'; // address you want the emailsto be from $successmess = '<b>Thank you for your input</b>'; //Message to say thanks. $errormess = '<b>There was a problem submitting your form</b>'; // Message for when there is an error in sending if (isset($_POST)) { $messagebody = ''; while (list($name, $value) = each($_POST)) { $messagebody .= $name.' = '.$value."\n"; } if(@mail($messageto, $messagesubject, $messagebody, 'From: '.$messagefrom)) { echo ($successmess); } else { echo ($errormess); } } else { echo (' <form action="'.$_SERVER['PHP_SELF'].'" method="post"> <input type="text" name="input1"> <input type="submit"> </form> '); } ?> I could do one for you that checks the inputs but I would need to know the inputs you need and what is expected for each input. Quote
Cygni Posted August 8, 2005 Author Posted August 8, 2005 I could do one for you that checks the inputs but I would need to know the inputs you need and what is expected for each input. <{POST_SNAPBACK}> Wow, looks impressive... And this code just goes into my html where I want the form to be? So I don't have to refer to a script outside my html? Or was that a dumb question? On the quote, ...I always hate those forms you can't get past without filling out EVERYTHING they want to know, and then in the format they want to have it in... Since I'm running the website of a church, not 'inputting' (new word?) selling info like credit card numbers and expiry dates or things like that, the only one I would like to have checked is if an e-mail address specified is a complete and possible e-mail address like a@b.c or so. And I have special html pages with the 'Thank you' message. Not with an error message, because I didn't know how to get it clear to the server that an error occured at all... So (I can at least interpret SOME code) I would like a referer hyperlink instead of an echoed message. I like this, I'd like to get into php some more when I would have the time for it. Have a book on it from Sitepoint.com on database driven websites. Very interesting, but I simply don't have that much time available... Quote
carbonize Posted August 8, 2005 Posted August 8, 2005 Email me a copy of the form you want to use, any restrictions imposed on the inputs, which (if any) inputs are required, which inputs need to be verified and for what (ie email address, url) and what you want to happen upon a successful submittal and upon an error (ie new page, message where form was etc). Quote
carbonize Posted August 8, 2005 Posted August 8, 2005 ps. I could easily alter the above script to send them to a nwe page upon success as well as just having the form in your page submit the data to the script rather than putting the script in your page. 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.