嗨,我想开始一个用户会话,但我无法做到这一点。我也看到了它的例子,但我的问题仍然是一样的。我收到这个错误
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/a2277283/public_html/scripts/login.php on line 11
这是我的代码
<?php
ob_start();
session_start();
include 'db.php';
if (isset($_POST['submit'])) {
echo $email = $_POST['user_email'];
$sql = "select * from user where `user_email` = '$email'";
if (mysql_query($sql)) {
$_SESSION['email'] = $email;
echo "$_SESSION['email']";
}
}
?>