Developed an online Sports Club Management system for easy time scheduling and a user-friendly interface that gives real-time information about the member's details, Payment, Time scheduling, Sport availability using HTML, CSS, Bootstrap, PHP and XAMP Server.
28
stars
12
forks
source link
Parse error: syntax error, unexpected identifier "session_start", expecting "{" in C:\xampp\htdocs\sport club mangment\include\db_conn.php on line 17 #1
<?php
$host = "localhost"; // local host name
$username = "root"; // Mysqli username
$password = ""; // Mysql password
$db_name = "sports_club_db"; // Database name
// Connect to server and select databse.
$con = mysqli_connect ($host, $username, $password, $db_name);
// Check connection
if (mysqli_connect_errno($this->con))
{
echo "Failed to connect to Mysql: " .mysqli_connect_error();
}
?>
<?php
function page_protect()
session_start();
global $db;
/* Secure against Session Hijacking by checking user agent */
if (isset($_SESSION["HTTP_USER_AGENT"]))
if ($_SESSION["HTTP_USER_AGENT"] != md5($_SERVER["HTTP_USER_AGENT"]))
session_destroy();
echo "<meta http-equiv= referesh content='0; url=../login />\" ;
exit();
}
}
// before we allow sessions, we need to check authentication key - ckey and ctime stored in database
/* If session not set, check for cookies set by Remember me */
if (!isset($_SESSION[user_data]) &&!isset($_SESSION[logged]) &&!isset($_SESSION[auth_level])) {
session_destroy();
echo <meta http-equiv='refresh' content='0; url=../login/>;
exit();
} else
<?php $host = "localhost"; // local host name $username = "root"; // Mysqli username $password = ""; // Mysql password $db_name = "sports_club_db"; // Database name
// Connect to server and select databse. $con = mysqli_connect ($host, $username, $password, $db_name); // Check connection if (mysqli_connect_errno($this->con)) { echo "Failed to connect to Mysql: " .mysqli_connect_error(); } ?> <?php function page_protect() session_start();
} // before we allow sessions, we need to check authentication key - ckey and ctime stored in database
{
?>