輸入你的決定

query($sql); $num = $result->num_rows; $ready = 0; if ( 0 < $num) { $row = $result->fetch_assoc(); $_SESSION['decision'] = $row["cdecision"]; $_SESSION['name'] = $row["cname"]; $decision = $row["cdecision"]; $name = $row["cname"]; $ready = 1; } else { header("Location:Classemail.php"); } $counter = 0; $sqlchoice = "select cid, cdesc from cselect"; $choiceresult = $conn->query($sqlchoice); $choicenum = $choiceresult->num_rows; while( $counter < $choicenum) { // Extract one row into an array $choicerow = $choiceresult->fetch_assoc(); if($choicerow["cid"]==1) { $choice1 = $choicerow["cdesc"]; } elseif($choicerow["cid"]==2) { $choice2 = $choicerow["cdesc"]; } else { $choice3 = $choicerow["cdesc"]; } $counter = $counter + 1; } $counter = 0; echo "

姓名: ".$name."

"; echo "

你的決定是:


"; ?>

回主頁