December 30, 2008 | In: Website Maintenance

Q&A: I can’t get this HTML code right, Help please (more info inside)?

Question by Shoultzy*: I can’t get this HTML code right, Help please (more info inside)?
Here is my code:

Where should i enter the ACTION=”mailto:myemail@example.com” ?

I want all of this information the people type in to get emailed too me when they press “Submit Form”

Any body know how to help?

name:
Email Address:
Reason For Email FeedBack

Questions

Photoshop Updates

Subscribe to Website
Form Fill out



Best answer:

Answer by Erfan Soleymani D
Hi

you can’t use a HTML code to send an email to a person, you should use a server side programming like PHP, J2EE, .Net and make a class to send an email to a person. when they complete the form server side program try to work with information. you can some sample to send an email at those programming languages. consider HTML is a client side programming like java script.

thanks

erfan.soleymani

Know better? Leave your own answer in the comments!

2 Responses to Q&A: I can’t get this HTML code right, Help please (more info inside)?

Avatar

juliepelletier

December 30th, 2008 at 10:00 pm

Here are the first things I notice:
- You expect to do back-end processing (sending an email from a web form) with just HTML. That is not possible. You would need to use a server side scripting like ASP or PHP.
- Your HTML doesn’t contain any “form” tag which would be required for it to work in any case.
- You should learn CSS to define your styles. This will help you to more easily improve the design and simplify the code.
- This form was probably copied from a web site designed to prevent browser auto-complete functionality.

Avatar

Michael

December 30th, 2008 at 10:07 pm

Your form is missing a

tag at the start. That is where you would specify the action to take on submitting the form.

[you should also move the

tag outside of the table.]

In addition you do not need the hidden inputs in the inital div. [However you may need something similar if you take the rest of my advice.]

Rather than us mailto: I would strongly suggest you use a form to email script. There are lots of form to email scripts available – http://search.yahoo.com/search?p=form%20to%20email

There are even sites that provide free hosting of form to email scripts – http://search.yahoo.com/search?p=form%20to%20email%20free%20hosting

For more on the form tag and its action attribute see: http://www.html-tags-guide.com/html-form-tag.html
For more on hidden input tags see: http://www.html-tags-guide.com/html-input-tag.html

Comment Form