Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's the best way to do an email form

Status
Not open for further replies.

okpeery

Instructor
Dec 29, 2005
102
US
I understand that you don't want to post your email on your website so you can avoid as much spam as possible. I want to make a form that gets emailed to my store email but doesn't cause an email application to open. I don't need anything fancy just a medium sized text area to include a message. When I do a google search I find lots of stuff about forms that use CGI bins, which I don't think I need. Anyone know of a good tutorial for a simple form?
 
You'll need some kind of programming language, as HTML alone will not do it. The best you can acomplish with standard HTMl, is getting the user's mail client (outlook, thunderbird,etc..)
to mail the form. But you said you don't want that.

What programming language, if any, is available to you?, be it client-side such as Javascript or Server-side such as ASP or PHP.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
I'd stay away from PHP and go with either Perl or ASP, CFM is always an option though, too.
 
I on the other hand, would suggest PHP, but that's irrelevant. What language is available to you?

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
I don't know those other programming languages. I don't know how to write javascript but I know how to find and implement javascripts. php is one that I think I need to start learning. Maybe this will give me the reason to do it. I could do a form the html way but I hate when I am on another computer other than my own and I try to use a contact form and it opens an email program. No matter how you many times you tell the receiver of the email not to reply because it isn't your email or if you are at an institution and no email program is set as a default, it is always a mess. By available to me do you mean my web host?
 
By available, I meant a language you are able to use in your current development. Assuming you are going to place the email form on your web host, then yes what languages does it support? There is no point in developing somethng in ASP if your host only supports PHP. or Viceversa.

If you are in the developing side of Websites and the such, you should start learning some kind of server-side language. PHP is gaining ground exponentially, not to say ASP is loosing any ground, it's still very strong.
But as with everything, there are advantages to one and disadvanteges to the other.

Anyway what language does your server support and we can go from there.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
My host supports both asp and php. I only intended to learn html, css, and javascript to manage my store's and my school's websites. I do not work as a web developer and don't have intentions to so I don't want to learn a programming language I won't need to use. Which language would make the most sense for me to start to learn asp or php? I know that is a general question but what are your thoughts?
 
I would learn PHP, but of course I'm being biast, as I don't like ASP.

You'll find that PHP programming is alot simpler and straightforward than ASP, although ASP has its own development GUI and PHP does not.

You can also find plenty of PHP scripts than need nothing more than to be pasted in a webpage to work.

You'll have to pick one so we can aid you in constructing the mail form.


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
You'll have to pick one so we can aid you in constructing the mail form.

In all honestly you should really re-post your question in the forum for the server side language you choose because this has fallen out of the scope of HTML/CSS.

-kaht

[small]How spicy would you like your chang sauce? Oh man... I have no idea what's goin' on right now...[/small]
[banghead]
 
Kaht, you are right, I was just waiting for the OP to select a language before actually directing them to the appropriate forum for it.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
the basic process is the same regardless of scripting language

1. Create a form
2. When the form is submitted, and optionally do a check on the contents and validate them - you can do this client side if you like to give instant feedback
3. Pass the info from the form to a server side script
4. Check the contents - you MUST do this to prevent abuse of the form
5. Take the form data and pass it to a function that does sends the mail

In PHP, step 5 can be as simple as writing
Code:
mail ( to, subject, message );

From what I recall, it can be equally as simple in ASP, though you may find that you need particular COM objects to be installed on the server.


Either way, there are a ton of server side scripts to handle mail forms available on the net. If you use one, just make sure that you get an up to date version that looks out for spam abuse.

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top