22.04.2013 Views

HTML, XHTML & CSS

HTML, XHTML & CSS

HTML, XHTML & CSS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 14: Working with Forms<br />

✓ All the information you need to get an input-processing program up and<br />

running<br />

✓ <strong>HTML</strong> to include in your pages so they can interact with that program<br />

You can tweak the markup that manages how the form appears in the canned<br />

<strong>HTML</strong> you get from an ISP, but don’t change the form itself — especially the<br />

form tag names and values. The Web-server program uses these to make the<br />

entire process work.<br />

Several online script repositories provide free scripts that you can download<br />

and use along with your forms. Many of these also come with some generic<br />

<strong>HTML</strong> you can dress up and tweak to fit your Web site. You simply drop<br />

the program that processes the form into the folder on your site that holds<br />

programs (sometimes called cgi-bin, often something else), add the <strong>HTML</strong><br />

to your page, and you’re good to go. Some choice places on the Web to find<br />

scripts you can download and put to work immediately are<br />

✓ Matt’s Script archive: www.scriptarchive.com/nms.html<br />

✓ The CGI Resource Index: http://cgi.resourceindex.com<br />

✓ ScriptSearch.com: www.scriptsearch.com<br />

If you want to use programs that aren’t provided by your ISP on your Web<br />

site, you need complete access to your site’s scripts or processing programs<br />

folder (sometimes named cgi-bin). Every ISP setup is different, so read<br />

your documentation to find out<br />

✓ Whether your ISP allows you to use programs or scripts in your Web<br />

pages<br />

✓ Which languages the ISP supports<br />

Perl and PHP are generally safe bets, but it’s best to be sure.<br />

Sending form data by e-mail<br />

You can opt to receive your form data from e-mail instead of using a script<br />

or other utility to process a form’s data. You get just a collection of nameand-value<br />

pairs tucked into a text file sent to your e-mail address, but that<br />

isn’t necessarily a bad thing. You can include a short contact form on your<br />

Web site that asks people to send you feedback (a feature that always looks<br />

professional); then you can simply include, in the action URL, the e-mail<br />

address where you want the data sent:<br />

<br />

243

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!