Set up an HTML mailto form without a back-end script
Takeaway: You don't have to use a back-end script to set up an HTML form. See how you can use a simple bit of HTML to accomplish the task.
Problem
IT professionals are often in charge of managing content on company Web sites and/or intranet sites. One of the most common interactive features used on these sites is the standard Web form, which allows customers and/or employees to submit information. However, setting up these Web forms typically requires a back-end script written in Perl, ASP, PHP, etc., and special server access for the script. That can make it difficult to quickly deploy a new Web form.
Solution
There's a way to set up a Web form so that it doesn't require a back-end script. By using some simple HTML "mailto" code, you can set up the form so that the results are automatically e-mailed to an address you specify.
The code looks like this:
<form action="mailto:admin@example.com" enctype="text/plain" method="post"><p>Name: <input name="Name" type="text" id="Name" size="40"></p>
<p>E-mail address: <input name="E-mail" type="text" id="E-mail" size="40"></p>
<p>Comment:</p>
<p><textarea name="Comment" cols="55" rows="5"
id="Comment"></textarea></p>
<p><input type="submit" name="Submit" value="Submit"></p>
</form>
The form will look like this:
You can copy and paste the HTML code from above into a standard HTML page. To get this form working right away, just change the e-mail address in "mailto:admin@example.com" to the appropriate address for your organization. You can also tweak other settings such as the size of the fields.
One drawback to using this method is that when users hit the Submit button, they will receive from their Web browser a message that requires approval for the e-mail being sent. Some users may get confused or intimidated by that, so you may want to put a short blurb on the Web page that tells users to expect the message from the browser and to approve it when it pops up.
Print/View all Posts Comments on this article
SponsoredWhite Papers, Webcasts, and Downloads
- Spyware: Know Your Enemy MessageLabs
- Enabling Software as a Service OpSource
- 2007 Microsoft Office System Suites Comparison White Paper Microsoft
- Spam Spikes: A Real Risk to Your Business MessageLabs
- Effectively Securing Small Businesses from Online Threats: Minimizing the Risks Associated with Email, Web, and Instant Message Communications MessageLabs
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET
