Hidden fields are special fields in a form that are not shown on the Web page. But when the form is submitted, values specified in the hidden fields are also submitted to the Web server. A hidden field can be specified with the <INPUT TYPE=HIDDEN ...> tag. The PHP script below shows you a good example:<?php print("<html><form action=processing_forms.php method=post>"); print("<input type=hidden name=module value=FAQ>\n"); print("<table><tr><td colspan=2>Please enter and submit your" ." comments about FYICenter.com:</td></tr>"); print("<tr><td>Your Name:</td>" ."<td><input type=text name=name></td></tr>\n"); print("<tr><td>Comments:</td>" ."<td><input type=text name=comment size=40>" ."</td></tr>\n"); print("<tr><td colspan=2>" .'<input type=submit name=submit value="Submit">' ."<td></tr></table>\n"); print("</form></html>\n");?>If you submit this form, you will get something like this:Number of values: 4 module = FAQ name = Peter comment = Thanks for the good tips. submit = Submit
PHP
Topic: PHP Forms
How To Support Hidden Form Fields?
Browse random answers:
What are the method available in form submitting?
What are the differences between GET and POST methods in form submitting?
How To Create a Web Form?
How To Generate a Form?
what are the various methods to pass data from one web page to another web page ?
Where Is the Submitted Form Data Stored?
How To Retrieve the Submitted Form Data?
What Happens If an Expected Input Field Was Not Submitted?
How To Avoid the Undefined Index Error?
How To List All Values of Submitted Fields?
What Are Input Values of SELECT Tags?
How To Specify Input Values for Radio Buttons?
How To Specify Input Values for Checkboxes?
How To Supply Default Values for Text Fields?
How To Remove Slashes on Submitted Input Values?
How To Support Hidden Form Fields?
Difference between Get and Post?
Difference between $_GET and $_POST ?
What is $_REQUEST method for ?
How can we access the data sent through the URL with the GET method?
How can we access the data sent through the URL with the POST method?
what is max POST size.
Default upload max file size of file a file in php.ini?.