无论如何设置表单变量而不输出任何东西?

时间:2018-03-30 02:35:28

标签: php html

您知道如何制作如下文本框,然后使用$ _POST ['密码']来获取其输入?

<input type = "password" name = "password" class = "box" placeholder="Enter Password" /><br/><br />

是否有办法插入固定数据而不输出任何内容。例如

<form action = "" method = "post">
    <div name = "username">abc</div> # Like for example here, I don't want to output "abc" just get the fixed input
    <label>Description </label><br>
    <textarea name="message" id="message" style="height: 150px;">Enter text here...</textarea><br>
    <input type = "submit" value = " Submit "/><br>
</form>

1 个答案:

答案 0 :(得分:2)

使用hidden类型:

<input type="hidden" name="username" value="abc"/>