Including Hidden Data in Forms


Want to send certain data items to the server script that processes a form but don't want the user to see them? Use the input type="hidden" attribute. This attribute has no effect on the display at all; it just adds any name and value you specify to the form results when they are submitted.

You might use this attribute to tell a script where to email the form results. For example, the following might indicate that the results should be mailed to me@mysite.com:

 <input type="hidden" name="mail_to" value="me@mysite.com" /> 


For this attribute to have any effect, someone must create a script or program to read this line and do something about it. My ISP's form script uses this hidden value to determine where to email the form data.

Most scripts require at least one or two hidden input elements. Consult the person who wrote or provided you with the script for details.




SAMS Teach Yourself HTML and CSS in 24 Hours
Sams Teach Yourself HTML and CSS in 24 Hours (7th Edition)
ISBN: 0672328410
EAN: 2147483647
Year: 2005
Pages: 345

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net