我正在尝试回显我的会话,但它没有显示。我认为会话正在运行,因为这是与其他所有页面相同的代码。唯一显示的部分是文本...“您的 id 是”和“League Home”。有人可以帮我弄清楚我的代码有什么问题吗?
<?php
// this starts the session
session_start();
$id = $_SESSION['userid'];
echo "Your id is " . $id;
//this connects to the database
$con = mysql_connect("localhost","yourfan3_jeengle","armyjoe30");
mysql_select_db("yourfan3_demo", $con);
//gets info for user
$result = mysql_query("SELECT * FROM League_Info WHERE User_ID = '$id'");
$result2 = mysql_fetch_array($result);
$leaguename = $result2['League'];
echo $leaguename;
//$result31 = $result2['Members'];
//$result32 = $result2['League_Password'];
//checks if league name exists
$memberslist = mysql_query("SELECT User_ID FROM League_Info WHERE League = '$leaguename'");
?>
<html>
<head>
</head>
<body>
League Home
</body>
</html>