我有以下的HTML表单我测试了。
<html>
<head>
<link href = "style.css" rel = "stylesheet" type = "text/css">
</head>
<form action = "test1.php" enctype = "multipart/form-data" method = "POST">
<input type = "hidden" name = "playno" value = "testing">
<input type = "image" src = "uploads/defb.png" name = "submit" value = "submit"/>
</form>
</html>
以下是保存在“test1.php”:
<?php
$hiddenvalue = $_POST['playno'];
if (isset($_POST['submit'])){
echo "OK";
}
else
{
echo "error";
}
?>
在broswer我回到值“测试”当我打印$ hiddenvalue。 然而每一次输出“错误”为好,而不是“OK”。
我将不胜感激任何帮助。 这是推动我疯了! 提前谢谢了。