-1
我想從查詢結果輸出數據到文本輸入和正常回聲,但它不輸出任何東西。我在PHP中沒有錯誤,我在mysqli代碼中做了什麼錯誤,它沒有迴應任何東西?沒有來自查詢結果的數據被回顯 - mysqli/php
function ShowAssessment()
{
$sessiondetailsquery = "
SELECT SessionId, SessionName
FROM Session
WHERE
(SessionId = ?)";
global $mysqli;
$sqlstmt=$mysqli->prepare($sessiondetailsquery);
$sqlstmt->bind_param("i",$_POST["session"]);
$sessiondetailsqrystmt=$mysqli->prepare($sessiondetailsquery);
// You only need to call bind_param once
$sessiondetailsqrystmt->bind_param("i",$_POST["session"]);
// get result and assign variables (prefix with db)
$sessiondetailsqrystmt->execute();
$sessiondetailsqrystmt->bind_result($detailsSessionId,$detailsSessionName);?>
$sqlstmt->fetch();
$sqlstmt->close();
<h3>CHOSEN ASSESSMENT</h3>
<input type='text' id='currentId' name='Idcurrent' readonly='readonly' value='<?php $detailsSessionId; ?>' /></td>
<br>
<strong>Assessment:</strong> <?php echo $detailsSessionName; ?>
<?php
}
?>
圖例,謝謝你的回答哈哈:) – user1964964