Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 无法访问文件+选择标记表单发送中的$\u POST变量_Php_Html - Fatal编程技术网

Php 无法访问文件+选择标记表单发送中的$\u POST变量

Php 无法访问文件+选择标记表单发送中的$\u POST变量,php,html,Php,Html,表格编号: <form action="my_php.php" method="post" enctype="multipart/form-data" id="postfile"> <input type="file" name="file" id="file"> <input type="submit" name="submit" value="Submit" class="style1"> </form> 它不显示任何内容。不

表格编号:

<form action="my_php.php" method="post" enctype="multipart/form-data" id="postfile">
    <input type="file" name="file" id="file">
    <input type="submit" name="submit" value="Submit" class="style1">
</form>
它不显示任何内容。

不,标记上必须有name=lang属性:


@PRP当然很高兴这件事曝光了
<select id="lang" form="postfile">
    <option value="gcc">C</option>
    <option value="g++">C++</option>
    <option value="javac">Java</option>
    <option value="python">Python</option>
</select>
echo $_POST["lang"];
<select id="lang" form="postfile" name="lang">
                                    ^ this
if(isset($_POST['submit'])) {
    // then access your POST values
    $lang = $_POST['lang'];
}

// this assumes you have an <input type="submit" name="submit" /> button