所以最近我試圖拉動所有的響應,當你點擊一個按鈕爲了向你展示你放置了什麼。在PHP中的一個方法內部使用下面的代碼行,我嘗試了這個並且傳遞這些信息。至於它不適合我。試圖從表單中提取響應
PHP方法
function results(){
$responses = $_POST['test'];
foreach($responses as $response){
print "".$response." <br />";
}
}
表單標籤
<form id="test" name="test">
BUTTON
<button type="button" onclick="results()">
Complete
</button>
您需要向該PHP代碼發送AJAX請求。 – chris85 2015-04-01 04:36:10
你也可以顯示你的輸入?克里斯是正確的,你不能調用一個按鈕上的onlick屬性的PHP函數。 – Gokigooooks 2015-04-01 04:41:16