PHP-Code:
<?php
function connect()
{
$con= mysql_connect('http://foxi.ltam.lu/phpmyadmin','<censored>','<censored>') or die(mysql_error());
mysql_select_db('Login',$con) or die(mysql_error());
}
function check_user ($mail, $pass)
{
$sql="Select UserID
From Login
Where UserMail='".$mail."' and UserPass=MD5('".$pass."')
Limit 1";
$resut= mysql_query($sql) or die(mysql_error());
if (mysql_num_rows($result)==1)
{
$user= mysql_fetch_assoc($result);
return $user['UserID'];
}
else
return false;
}
function login($userid)
{
$sql="Update Login
Set UserSession='".session_id()."'
Where UserID=".$userid;
mysql_query($sql);
}
function logged_in()
{
$sql="Select UserID
From Login
Where UserSession=".session_id().";
$result= mysql_query($sql);
return (mysql_num_rows($result)==1);
}
function logout()
{
$sql="UPDATE Login
SET UserSession=NULL
WHERE UserSession=".session_id().";
mysql_query($sql);
}
connect();
?>
kirege immer folgende fehlermeldung:
Parse error: parse error, unexpected T_STRING in /srv/www/students/gi12/gi12_02/TeleInfo-Projet/sessionhelpers.inc.php on line 43
würd mich freuen wenn mir einer dabei helfen könnte pls
Kommentar