我有这样的代码:我想知道单击提交按钮后如何获取文本框的值,因为在我当前的代码中,它只给了我最后一个 $key 而不是 all 。谢谢
<form>
foreach($array as $key => $values){
echo "<input type='text' name='title' value='$key'/>";
}
<input type='submit' name='submit' value='submit'/>
</form>
<?php
if(isset($_POST[''])){
//get the result of the textbox
$title = $_POST['title'];
}
?>