Form question

They have: 117 posts

Joined: Feb 2000

Hi,

Is there any way to have the system automatically return the email address of the person submitting the form? I know I could have the person enter this, but I want to get it automatically, if possible. Thanks.

Bob

They have: 67 posts

Joined: Aug 1999

Hi,
There are a few pointers you may like to consider..
Although I believe this can be done, it is not widely known due to it could fall in the wrong hands and we would all end up getting more unwanted mail than we already get putting it mildly.
Do you not also think it is the persons choice to supply their email address and what if they want to use another email address for a reply, etc, etc.
What do you require such a script for anyway?
Also, I don't think you will find your answer on any respectable forum board.

Best stick to plan A and ask for it I guess.

Ian

------------------
Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com

Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com

They have: 117 posts

Joined: Feb 2000

Ian,

Thanks for your reply. Let me explain what I am trying to do, and maybe you'll understand better. I maintain a web site for an organization. We want to use the web site for election of officers. I want to put a form out on the site where they can use radio buttons to select whom they are voting for for President, etc. I don't think I will have any problems, but I wanted to eliminate the possibility of having someone vote more than once. I thought if the persons email address was automatically included in the response, I would know if the person had already voted. Any other ideas to accomplish this would be appreciated. Thanks again.

Bob

AndyB's picture

They have: 344 posts

Joined: Aug 1999

Why not use a cookie (and hope your voters have cookies enabled). Then using jscript to check if the cookie is set would disallow another vote.

Well, at least they would have to use a different computer to vote again

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi,

If your site allows cgi, put the users in a database, and check off whether they voted or not. This implies that they must enter their addresses or some other unique value. When the form is submitted, you check if the user's vote field in the dbms is checked, incremented, or whatever, and then perform the appropriate action.

Javascript is not allowed to automatically access a user's email address. The best it can do is get the previous location, which isn't much help in your case.

Vinny

Where the world once stood
the blades of grass cut me still

They have: 6 posts

Joined: May 2000

Do you have a handy example of the cookie code, I could use that.
Thanks,
Pennie

quote:Originally posted by AndyB:
Why not use a cookie (and hope your voters have cookies enabled). Then using jscript to check if the cookie is set would disallow another vote.

Well, at least they would have to use a different computer to vote again

Step Off

AndyB's picture

They have: 344 posts

Joined: Aug 1999

http://wsabstract.com/script/cutindex7.shtml
that should get you started on the simple cookie trail.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.