CGI & mailform advice needed (for a good cause) Bottle of Whisky up for grabs !

Hi Gurus all,
a little help needed and if anyone can the dopers can.

I’m doing a free website for a charity local to me, a guy rescues seals in these parts, and his dedication is most admirable, he’s had his property shot at with rifles, dead seals hung on the fence outside his home (and his wife and children have to suffer this too) etc. by ignorant fishermen who wrongly say that seals eat the fish, put them out of business etc.

Hopefully I can raise some public awareness for him with a website, and even more hopefully some funding from here and there.

The sites only half way to being a beta version at the moment, but I’ve run into difficulty with a mail form for a page where people can volunteer to go along and work at the rescue centre.

Forms are something that I don’t deal with in my line of work (although its site related). I’ve got the outline of the page together, containing all the elements it needs, but am at a loss as to the next step. There’s a cgi bin on the server, and I can run anything, perl to cold fusion depending on which server I map the domain to, whatever (not going there).

Presumably now what’s needed is a script of some description, to take all of the input fields, turn them into something comprehensible then mail that info to a pop3 box. (this is my pure speculation as I don’t know)

I’ve trawled the myriad of free script archives, but they all seem to be for a format they set out themselves, and some which host it remotely which is not required. The idea is to make life as simple as possible for the guy running the sanctuary, so that what he gets as a result is a mail with all his questions answered.

There is no budget for the site, it’s a gift from me, and as such all expenses are mine to pay.

If I have to pay to get this script done then I will, and if so can anyone recommend where such a service can be found (the cheaper the better)?

Better still can someone help me get it done with knowledge they possess - anyone willing to assist will receive not only a great deal of gratitude, but a bottle of 12year old malt from the northernmost Whisky distillery in the UK!! – it can be sent anywhere in the world.

The page which needs sorting is
http://www.orkneysealrescue.com/orkney-seal-rescue-volunteer-form.htm
and you can see the context in which it is relevant to the site by going to
http://www.orkneysealrescue.com/test2.htm
and clicking the volunteer page link, please remember this is very unfinished i.e. lots of content yet to be placed.

Any suggestions to help me help the seal rescue centre would be deeply appreciated, I can only spare one bottle of Whisky, so its first solve first receive for that one unless any of you wish to form a collective and consume it at an appropriate Dopers meet :slight_smile:
Any further questions, anything at all my email is me@skaill.com

Thanks in advance
Kevin Roberts

Alternatively, I think many servers will now send a list of the variables and values if tell it to submit to an e-mail address.

Of that whiskey?

Serious, send me a mockup of what you want the form to look like (text, pdf, sketched, whatever)
and what you want the output to look like,
and what you want it written in.
I can do perl, php, c++, shell script. Could do it in a few other languages too, but those would be easiest.

Try this:

#!/usr/local/bin/perl5 -w

The CGI and the Mail::Mailer packages are available from CPAN

CPAN is at http://www.cpan.org

use CGI;
use Mail::Mailer;

sub printPage {
my $cgi = new CGI;

print $cgi->header;
print $cgi->start_html;

my $mailer = Mail::Mailer->new();

$mailer->open( { To => 'YOURNAME@YOURDOMAIN',
	     Subject => "Volunteer Info",
	   } )
  or die "Can't open: $!

";
foreach my $i ( sort $cgi->param ) {
print $mailer “’$i’: '” . $cgi->param( $i ) . "’
";
}
$mailer->close();

print "Your information has been mailed", $cgi->br;
print $cgi->end_html;

}

printPage;

Kyberneticist

The trouble is that Ive hosted the domain(s there are 4 of them, .com, net, org and co.uk)along with about 40 others on a really good deal(virtual server) I couldn’t refuse, so the CGI bin is empty, whereas the last provider I used was very expensive per domain but the basic handling scripts were there.
perl or c++ is fine, the look of how it ought to be is at http://www.orkneysealrescue.com/formtest.htm and this is the tricky bit, I dont have a clue how this would be implemented within the cgi bin.

BTW its Scottish so its Whisky (even though here is not Scottish), Whiskey comes from Ireland, and if I hadnt lent the digi cam to the seal rescue there would be a pic of a bottle posted just to make you salivate some more :slight_smile:

He already sent you a script.
If you want something more complex, there is one I created for a prior workplace (in Perl).
Tries parsing http-refer. Uses a default form if it can’t (although I guess it could read a template then).

Could do all the work for you too, if you gave me access to the cgi-bin directory…

Kyberneticist
Yes, he sent me a script - thankyou bpaulsen (got the mail too thanks)and the contents of that link will be studied in great depth.
The trouble is it means nothing to me, greek, gobbledygook etc ( ok im stupid :slight_smile: zero is my comprehension of such things ! and time is against me.
I can grant access no trouble, just mail me@skaill.com and ill send the info.

Just for the record, all pinnipeds eat fish, as well as small crustaceans, squid, and cuttlefish.

Uncle Beer,
Firstly do excuse an almost insignificant part of my rather hastily written original post in which I somehow missed out referring to the exact types of fish the seals eat. Their diet is scientifically proven to consist of mostly a type of fish which is not a commercial catch in these parts, hence the anti seal lobby’s main argument is largely unfounded, that was not the point of the post, why nit pick so?
You wouldn’t be troll baiting perchance? Given that I happened to have the timing misfortune of joining after lurking for quite some time at about the same time all that troll stuff was occurring. (how you put up with that sort of s**t is a mystery to me )
Chances are I have the same IP as some of them, but does not mean to say I am one.
If your ever passing this way let me know, when you get back you can change your name to Uncle Alcoholic Poisoning :slight_smile: !!!
Regards

The Whiskey is won.

Just a massive thankyou to for the amazing informative feedback,
thats one the great things about this board, its brilliant, where else do you get a problem like that solved in less than a couple of hours.
Thanks very much guys
send your addresses email and i’ll put you on the sealrescuenews mailing list.
Regards and thanks and more thanks
Kevin Roberts

Free scripts of every type: cgi-resources.com

Plus, if you want to get donations for the guy from people with credit cards, sign up at paypal.com Its free!..course, if you give my email as a reference, I get a few bucks.

But Paypal.com insures all accts to $100,000…not that he would get that much :slight_smile: