Forum Moderators: open

Message Too Old, No Replies

How to allow visitors to give email addresses

without server-side scripting

         

Purple Martin

3:48 am on Oct 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A friend asked me this question this morning. She has a small personal site on a free host. She wants visitors to be able to enter their email address on a one-field form and submit it to her. Normally this is very simple, but because the host is free there's no server-side scripting whatsoever. Is this impossible? Or have I missed something obvious?

mack

5:11 am on Oct 10, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You could use a form field and have the details sent to an email address.

The folowing HTML code should do the job.

<form method="POST" action="mailto:you@emailadress.com">
<p>Please enter your email address:
<input type="text" name="T1" size="20"><input type="submit" value="send" name="submit"></p>
</form>

All you need to do is change you@youremailaddress to your real email address. The only draw back with using this method is that windows will prompt the user "you are sending information that is not secure do you wish to proceed"

I have used it on a few smaller sites in the past with no real problems. Belive it or not I once came across an online store accepting credit card details this way.

Purple Martin

5:25 am on Oct 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks! I'd completely forgotten about using mailto in the action :o

mack

5:28 am on Oct 10, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



When it gets late, we all get tired :)

dingman

6:59 am on Oct 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



accepting credit card details this way.

Please tell me you didn't fill out that form! Who encourages users to commit credit card details to a medium as insecure as e-mail? I'll forgive anyone who reads in the form data, and feeds it through PGP before mailing it on, but not a mailto URL.

mack

3:42 pm on Oct 10, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Nope I didnt use it. I just though that the page looked very unprofesional and was qurious... so I clicked on view source and there it was.