I don't know why this code for "log in "doesn't work?
http://192.168.1.124/~imagiq
Parse error: parse error, unexpected $end in D:\users\imagiq\login\check.php on line 42 (the last line£©£¿
check.php
<?php
session_start();
$sessid=session_id();
if ($_session['userid'])
{
header("Location: http://www.dot.com/main.php");
}
if ($POST['submit'] && $POST['user'] && $_POST['passwd']) {
$conn=mysql_connect("localhost","root","");
mysql_select_db("imagiq",$conn);
$test = mysql_result(mysql_query("SELECT COUNT(*) FROM users WHERE user='".$POST['user']."' AND passwd=MD5('".$POST['passwd']."')"),0);
if ($test == 1) {
$userid= mysql_result(mysql_query("SELECT id FROM users WHERE user='".$POST['user']."' AND passwd=MD5('".$POST['passwd']."')"),0);
$_SESSION['userid'] = $userid;
header( "http://www.dot.com/main.php");
}
else
{
mysql_close($conn);
session_destroy();
echo '<html>
<head>
<title>Login failed!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Invalid login. Blabla bla try again <a href="login.php">here</a>
</body>
</html>';
}
?>