我很難理解會議。我想在會話中存儲card_id
,我該怎麼做?與會議合作
$resultSet = $mysqli->query ("SELECT value FROM card_credit
WHERE card_id= (select distinct card_id
from Raw where
id = (select max(b.id) from Raw as b))");
if($resultSet->num_rows != 0){
while($rows = $resultSet->fetch_assoc())
{
$card_id = $rows['value'];
echo "<p>Saldo: $card_id";
使用此$ _SESSION [ 「card_id的」] = $ card_id的; –
使用'session_start()','$ _SESSION []'和PHP文檔http://php.net/manual/en/book.session.php –
您的示例與會話無關。唯一相關的行(答案的起點)是'$ card_id =' –