...

View Full Version : submit forms without cgi capability



bcuria
07-28-2002, 01:19 AM
what script can I write to submit form information if my web host (Geocities) does not have cgi capabilities?

I want to have the form info sent both to myself and to the person who filled in the form.

OnSubmit="validateForm(this)" then what?

joh6nn
07-28-2002, 06:10 AM
there's a very unreliable method that was designed for this purpose. you set the Form's method to post, and it's action to "mailto:you@your.com". you can have multiple recipients, and i think that's done by just sticking a comma between addresses, but i'm not sure. you should be able to find a more definite answer by searching this forum.

bcuria
07-29-2002, 01:05 AM
If I use that method, won't it limit me to sending email only to the people who's addresses are listed? My school assignment is to have ANYONE fill out my form, click submit, and the info will be sent to me AND to the person who submitted.

Does anyone know how to get around this problem with Geocities? Since they don't allow cgi scripts, I need to come up with a solution to send these emails to whomever fills out my form.

http://www.geocities.com/bevcuria/461.htm

Thanks.

HopeSprings
07-29-2002, 04:24 AM
Bev, using the POST method in FORM, try this:

<A HREF="MAILTO:bcuria@geocities.com?CC=student@myschool.edu&BCC=profjones@myschool.edu&SUBJECT=Survey Results&BODY=Thanks for responding>Submit</a>

bcuria
07-30-2002, 06:20 AM
Hope,

It still seems to me that this limits my email options. I want to have the form info sent to me plus to the person who submitted info, regardless of who they are.

Can I write the HREF so that it will respond to the email address listed in my form?

For example, if my form asks your name and email address, you fill it out and click submit. My script should send me and you a copy.

Spookster
07-30-2002, 07:14 AM
Using mailto: in a form is going to open the users email program and use that to send the email so they will already have a copy of it as long as they are keeping copies of their sent emails.

Also note bcuria this is YOUR homework assignment so you should be doing it not someone else. This forum is not for having your homework done for you. Once you have something written and you get stuck and have specific questions we will guide in the right direction.

bcuria
07-30-2002, 07:26 AM
Spookster,

My apologies. :-(

I wasn't trying to get the entire code, I was just trying to find a workaround to solve the issue in the assignment that asks us to use cgi and formmail.pl . I already wrote the script for validating my form, the only problem is in trying to get the submit to show the submitter and myself that the form worked (which is why I am trying to find a workaround for a lack of cgi capabilities).

Wasn't trying to be lazy!

Spookster
07-30-2002, 02:26 PM
It's okay. So the teacher gave an assignment requiring use of a CGI bin and didn't supply the necessary tools to complete the assignment? That's not very nice.

Try a different free web host. There are many around. Do a search of the forums for free web hosts and it will turn up something you can use so that you can have access to a CGI bin.

kansel
07-30-2002, 04:25 PM
You can have the form sent to an unspecified email address easily enough... depending on your level of JavaScript skill.

First add an additional field in your form for the visitor to enter his/her email address.

In your form validation script, test for the existence of a valid email address in this field (should probably be a fairly rigorous test unless you trust your visitors). If the test passes (i.e. there's a valid email address there), use string manipulation to insert that email address into form.action. (Hint: split form.action into two pieces where you need to add the email, then join the two pieces with the email address.)

Let me know if you need more help with this.

-kansel



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum