Having a hard time understanding <input type"hidden> within a form. Can someone clear this up for me once and for all with an example or 2 on when it would be useful to use it?
| SitePoint Sponsor |


Having a hard time understanding <input type"hidden> within a form. Can someone clear this up for me once and for all with an example or 2 on when it would be useful to use it?

Hidden fields are best used when you want to pass data to another page but dont want it to be seen by the user. So you could have
Than on the next page you could grab the dataCode:<input type="hidden" name="date" value="29-10-2006">
Or some thing similar. Hope this clears it up. Just remember this isn't secure. Anyone can see it just by viewing the page source.Code:$date = $_POST['date'];
Bookmarks