Home html What is this field: input type = “hidden”?

What is this field: input type = “hidden”? [duplicate]

Author

Date

Category

Hello! Help me figure out the code. I started to learn php from Popov’s lessons, everything is clear, but in the HTML code of the example site, this piece is incomprehensible:

& lt; div class = "formm" width: "80%" & gt;
& lt; p class = "form3" & gt; Subscribe to our newsletter and receive the latest lessons, articles and news, directly to your inbox! & lt; / p & gt;
& lt; form action = "" method = "post" name = "SR_form" target = "_blank" & gt;
& lt; input type = "hidden" name = "version" value = "1" & gt;
& lt; input type = "hidden" name = "tid" value = "34769" & gt;
& lt; input type = "hidden" name = "uid" value = "27025" & gt;
& lt; input type = "hidden" name = "charset" value = "windows-1251" & gt;
& lt; input type = "hidden" name = "lang" value = "1" & gt;
& lt; input type = "hidden" name = "did []" value = "9267" & gt;
& lt; p class = "form1" & gt; Russian name: & lt; / p & gt;
& lt; input type = "text" name = "field_email" size = "20" value = "" maxlength = "50" style: border = "1px" # C5C5C5 & gt;
 & lt; p class = "form1" & gt; Email address: & lt; / p & gt;
 & lt; input type = "text" name = "field_email" size = "20" value = "" maxlength = "50" style: margin = "0px"; padding = "0px" & gt;
 & lt; p "style = margin: 5px; margin-top:" 10px "; padding: 0px;" & gt;
 & lt; input type = "submit" name "SR_submitButton" value = "Subscribe" style = "font-family: Verdana, sans-serif" & gt;
 & lt; / p & gt;
& lt; / form & gt;
& lt; / div & gt;

Namely:

& lt; input type = "hidden" name = "version" value = "1" & gt;
& lt; input type = "hidden" name = "tid" value = "34769" & gt;
& lt; input type = "hidden" name = "uid" value = "27025" & gt;
& lt; input type = "hidden" name = "charset" value = "windows-1251" & gt;
& lt; input type = "hidden" name = "lang" value = "1" & gt;
& lt; input type = "hidden" name = "did []" value = "9267" & gt;

Is this some kind of invisible field? What is it for?

And this point is not entirely clear in the CSS code:

html & gt; body #coolmenu a {
  width: auto;
}

Answer 1, authority 100%

Description of input type

I will add to the description that these fields are used for: checking, sending or storing any data you need that you will retrieve or write using the same PHP in these fields


Answer 2, authority 67%

are hidden fields, into which you can substitute data using php or js, unnoticed by the user. and then you can get them into the handler with the rest of the form fields, you can get them through $ _POST or $ _GET, depending on what you specified in the & lt; form … tag.


Answer 3, authority 33%

It can be used, for example, when editing a record – leave its id in the hidden field hidden. The user will not see it, but you will receive the data in the post request.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions