表单提交后,超级全局变量为空;然而,得到作品!
下面是代码:
的index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Simple Form</title>
</head>
<body>
<fieldset>
<form action="print.php" method="POST" >
first name:<input type="text" name="Fname"><br>
last name:<input type="text" name="Lname"><br>
<input type="submit" name="submit" value="submit">
</form>
</fieldset>
</body>
</html>
print.php
<?php
echo $_POST['Fname'];
echo $_POST['Lname'];
?>
相同的代码工作正常,在我的电脑和打印print.php的东西,但在这里我提交表单后,Macbook $ _post始终为空。
我使用IntelliJ IDEA作为我的IDE与PHP插件。
那么你的问题是什么? –
@hmtareque我不能在服务器端使用表单的数据,因为$ _POST总是为空,它不是由表单的数据填充。 – Sina