- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
How to create an ASP contact form in HTML
November 15, 2010
Let’s learn it at an example. Let’s say one of your pages has a code as follows:
The layout of the contact form can look like this:On your server you should have a script that will actually generate and send e-mails to a certain e-mail address. A sample of this contact.asp script you can download here. The ASP script is supported on the most of Windows-based hosting servers.
Our html form has two tags: opening and closing . For the form to pass data to our contact.asp we need to specify five attributes within this tag:
where you can see the code for the Reset button:
You have to insert the same values as in example above, so let’s see how the result code should look like:
Now let’s take a look at the contact.asp file, what do we need to change here. Open it with your php editor and find the following lines:
‘—-Settings———–
subj = “Contact form from your site” – (here you can change heading message which you will receive in the letter from guest)
mail_from = “admin@tsie.loc” – (here you need to put your website mail address )
mail_to = “andy@template-help.com” – (here you need to put your own email address)
smtp_server = “localhost” – (here you need to put SMTP server name of your server )
smtp_port = 25 – (here you need to put SMTP port of your server)
If you don’t know these settings, you need to contact your hosting provider for the details.
And the code for Submit or Send button:
Now lets take one of the templates which doesn’t have the CSS structure and uses tables. Here is the default code from the contact form:
|
clear send |
|
clear send |