Welcome to WebmasterWorld Guest from 54.167.213.22

Forum Moderators: incrediBILL

Message Too Old, No Replies

Creating a contact form using just html

submitting info as a mailto: xyz@xyzhost.com

     
2:09 am on Jan 10, 2005 (gmt 0)

10+ Year Member



I am trying to find out how to create a contact form using just html and being able to submit this info to an e-mail address.

-Mike

2:22 am on Jan 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here is the basic code that you need:
<form action="mailto:xyz@xyzhost.com" method="post" enctype="text/plain">

<table width="80%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="35%">
<div align="right"><b>Name:</b></div>
</td>
<td width="65%">
<input type="text" name="name" size="15">
</td>
</tr>
<tr>
<td width="35%">
<div align="right"><b>Email:</b></div>
</td>
<td width="65%">
<input type="text" name="email" size="20">
</td>
</tr>
<tr>
<td width="35%">
<div align="right"><b>Comment:</b></div>
</td>
<td width="65%">
<textarea name="comment" cols="25" wrap="virtual" rows="3"></textarea>
</td>
</tr>
<tr>
<td width="35%">&nbsp;</td>
<td width="65%">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="reset" value="Reset">
</td>
</tr>
<tr>
<td width="35%">&nbsp;</td>
<td width="65%">&nbsp;</td>
</tr>
</table>
</form>

[edited by: tedster at 8:22 pm (utc) on Jan. 10, 2005]
[edit reason] remove extra line breaks [/edit]

3:52 am on Jan 10, 2005 (gmt 0)

10+ Year Member



You should note that this method requires that the user have an email client installed on their workstation, and that it be properly defaulted to accept mailto:// links. (Otherwise, nothing, or worse, some other default email program opens.)

Also, this is an open invitation for spammers to back a truck up to your mailserver and just start pouring their [insert expletive here] in.

10:27 am on Jan 10, 2005 (gmt 0)

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



To expand on what Slade said, the above method does not allow users on public access machines (read: webmail) and webmail users to submit that form to you.

I'd strongly advise using a backend form processor.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month