coldasice 0 Report post Posted December 20, 2007 well what is hidden fields for.. i see alot of em in sources... what purpose do they server?how to use em?etc?well can any one help me out here =? Share this post Link to post Share on other sites
rvalkass 5 Report post Posted December 20, 2007 Hidden fields are used for passing information in the same way as a non-hidden field. The difference with a hidden field is that the user never sees it. This means it always gets submitted with the default value, or a value set with some JavaScript.The main use for these is to confirm that a form was submitted using your form. A hidden field with a set value can be detected when a form is submitted with your script, but not if someone tried to inject values. They are also used to hold values set with JavaScript in some forms, and then to pass this data to PHP. For example, if you had a calendar in JavaScript and the user clicks a date, you could set the value of the hidden field to that date and therefore pass it to a PHP script. Share this post Link to post Share on other sites
coldasice 0 Report post Posted December 20, 2007 Hidden fields are used for passing information in the same way as a non-hidden field. The difference with a hidden field is that the user never sees it. This means it always gets submitted with the default value, or a value set with some JavaScript.The main use for these is to confirm that a form was submitted using your form. A hidden field with a set value can be detected when a form is submitted with your script, but not if someone tried to inject values. They are also used to hold values set with JavaScript in some forms, and then to pass this data to PHP. For example, if you had a calendar in JavaScript and the user clicks a date, you could set the value of the hidden field to that date and therefore pass it to a PHP script. thank you verry mutch.. i understand a little more but not enough hm.. can i in a way make a hidden field in a login.. instead of using submit value.. i can use hidden field value ? Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted December 20, 2007 Yes, exactly correct. The 'hidden' value would not be visible to the User, but the receiving script would use it to confirm that the form and been submitted.w3schools.com has a good tutorial that may make it clearer for you. Share this post Link to post Share on other sites
coldasice 0 Report post Posted December 20, 2007 Yes, exactly correct. The 'hidden' value would not be visible to the User, but the receiving script would use it to confirm that the form and been submitted.w3schools.com has a good tutorial that may make it clearer for you. welll thank you.. can u give me a link.. im surfing trough w3schools.. but i cant find it Share this post Link to post Share on other sites