0
我使用foreach語句創建多個表單。
我想檢索當用戶單擊按鈕時我的段落ID設置爲的$ _POST值。
我不知道如何在我的displayTeacherProfile函數中使用$ _POST,因爲我不知道我的段落id的確切值設置爲什麼。
<?php foreach ($data['teachers'] as $teachData): ?>
<form class="form-horizontal" id="form" action="/MVC/teacher/displayTeacherProfile" method="post">
<tr>
<td><?php echo $teachData['username_email'] ?></td>
<td><p class="form-control-static" name="<?php $teachData['person_id'] ?>"
id="<?php $teachData['person_id'] ?>"><?php echo $teachData['language_name'] ?></p>
</td>
<td>
<button id="continueButton" name="action" type="submit" class="btn btn-default"
value="Search">Visit Profile
</button>
</td>
</tr>
</form>