次のようなコードがあります。送信ボタンをクリックした後にテキストボックスの値を取得する方法を知りたいのですが、現在のコードでは、 all ではなく最後の $key しか返されないためです。ありがとう
<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'];
}
?>