![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
|
Submit
<form><input type="submit" value="Submit Query"> How do I get it to actually submit to my email address? I heard I need something called a "CGI" Last edited by navnav; Apr 18th, 2005 at 12:43 PM. |
|
|
|
|
|
#2 |
|
Programmer
|
Well, I don't have much experience with forms, but I've been researching them all day, so I'll share what I found and hope it helps you
![]() First off, CGI stands for Common Gateway Interface (I find understanding acronyms helps me sometimes ).Second, you don't necessarily neeed CGI, from what I've found today. Apparently, you can use JavaScript. Here's some info on the CGI side of things from my most favourite HTML tutorial ever, and the next page, with it's JavaScript information. If you need any other HTML information, I highly reccommend the tag section of this website.
__________________
I had a dream that Triumph the Insult Dog owned Microsoft... How...appropriate. |
|
|
|
|
|
#3 |
|
Expert Programmer
|
Actually, for a form to work in a non-javascript browser you should always have a CGI based fallback. Additionally, you shouldn't rely on a javascript method of sending data as things like email would probably require a set up email account, and it may not even be supported.
CGI is not a technology, but rather an interface: it refers to the "gateway" between an HTTP transaction (sent by the browser to the server when the user clicks submit) and a data processing entity on the server. If you know any programming language (C, Delphi, VB) you can write this yourself, you can learn a script based language such as Perl or PHP, or get a prewritten CGI application. As the server handles all the data communication, you can easily write very flexible solutions using the standard I/O functions without worrying about the technicalities of the HTTP protocol. You just have to ensure your program outputs valid HTML. If you want to write a CGI program in an application language, I'd suggest posting in the relevant forum for more information and there are also PHP and Perl forums. Hope this is helpful. |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 335
Rep Power: 4
![]() |
If you just want your form contents to be sent to you by email, you could use:
<FORM action="mailto:youremail@address.here" enctype="text/plain"> to start the form. This reveals your email address, and your users might not like it either since if they submit, their browser will reveal their email address to you, too, which can put people off. Also, it does depend on their browser being capable of, and configured to, submit forms this way; I hear some modern browsers just don't do it. Another method, if your web hosting supports CGI, is to use an off-the-shelf form-to-mail script; these are generic CGI scripts which will bundle up form data and post them to you by email. These will often still reveal your email address to anyone who views the source of your pages, but some don't, and they can be a quick and easy solution. They're helpful because the form submission then goes over HTTP which means no special browser features or settings are required and most users will be happy with the level of privacy this offers them. Even better, and excuse the blatant advert, you could take a look at Ramdro (the RAdicalabacus Message DROp script) on our website http://www.radicalabacus.org/ - it's in the software section. Again, this is only any use to you if your web hosting account supports CGI (in Perl). Like a form-to-mail script, this allows your forms to all be submitted to the one standard script. Unlike them, you don't get the results in your email address, but by logging in to Ramdro via your website and collecting the messages. This saves your inbox from being cluttered up with form submissions, and Ramdro's input validation feature can help prevent incomplete or invalid submissions. Anyway, enough advertising already! Hope this helps. |
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: May 2005
Location: Woo - Boot Sector!
Posts: 294
Rep Power: 4
![]() |
However, navnav should note that if the form contains any password encrypted text boxes, IE at least, will display a message telling the user that it'll be emailed to someone. And then give the user a chance not to continue.
__________________
www.heldtogether.co.uk |
|
|
|
|
|
#6 |
|
Programmer
Join Date: Jun 2005
Location: Queensland
Posts: 37
Rep Power: 0
![]() |
form
mackenga is exactly right. i made a microsoft .net 'login' and watever a person typed in got sent to my email. easy to trick morons, but fun. you can also goto a html tool site like bravenet and they'll give you code to send form info to your email.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|