|
 |
|
parse error, unexpected T_VARIABLE in c:\appserv\www\chkmember.php on line 14 ลองเช็คดูมันก็ถูกงง.. |
|
 |
|
|
 |
 |
|
<?php
function ChkLogin($conn,$email,$password)
{
$strSQL="select * from member";
$strSQL=$strSQL."where mem_email='$email'";
$strSQL=$strSQL."and mem_password='$password'";
$resulf=mysql_query($strSQL,$conn);
if(!$result)die("select not open".mysql_error());
if(mysql_num_rows($result))return true;
return false;
}
$conn=mysql_connect("localhost","","");
if(!$conn)die("not connect Mysql")
mysql_select_db("member")or die("not connect database");
if($_COOKIE["CK"]["Flag]"]!=true)
if(ChkLogin($conn,$mem_email,$mem_password))
{
$strSQL="select * from member";
$strSQL=$strSQL."where mem_email='$mem_email'";
$strSQL=$strSQL."and mem_password='$mem_password'";
$result=mysql_query($strSQL,$conn);
if(!$result)die("select not open".mysql_error());
$sr=mysql_fetch_array($result);
setcookie("CK[Flag]",true,time()+3600);
setcookie("CK[mem_id]",$rs[mem_id],time()+3600);
setcookie("CK[mem_fullname]",$rs[mem_fullname],time()+3600);
setcookie("CK[mem_tracking]",1,time()+3600);
echo"<html>\n";
echo"<head>\n";
echo"<title> Member Login </title>\n";
echo"</head>\n";
echo"<body bgcolor=\"#E3E3E3\">\n";
echo"You<b>$rs[mem_fullname]<\b>comin<b>1</b><p>";
echo"<a href=\"Logout.php\">Logout</a>";
echo"</body>\n";
echo"</html>\n";
}
else
{
echo"Login Password not current<br>";
echo"<a href=\"FrmMemberLogin.php\">Logout</a>";
}
else
{
$_COOKIE["CK"]["mem_tracking"]++
setcookie("CK[mem_tracking]",$_COOKIE["CK"]["mem_tracking"],time()+3600);
echo"<html>\n";
echo"<head>\n";
echo"<title> Member Login </title>\n";
echo"</head>\n";
echo"<body bgcolor=\"#E3E3E3\">\n";
echo"Cookie save Login<br>";
echo"You<b>$CK[mem_fullname]<\b>comin<b>$CK[mem_tracking]</b><p>";
echo"<a href=\"Logout.php\">Logout</a>";
echo"</body>\n";
echo"</html>\n";
}
?>
มันติด Parse error: parse error, unexpected T_VARIABLE in c:\appserv\www\chkmember.php on line 14
ผมลองเช็คโค้ดมันก็ถูกครับ งง T.T
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2009-11-13 11:43:22 |
By :
billion3 |
View :
1037 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ถ้าถูกมันก็ไม่มีเตื่อนสิครับ  
Code (PHP)
$conn=mysql_connect("localhost","","");
if(!$conn)die("not connect Mysql")
แก้เป็น
$conn=mysql_connect("localhost","","") or die("not connect Mysql");
Code (PHP)
$_COOKIE["CK"]["mem_tracking"]++ ; //ใส่ ;
ข้อความเตื่อนแบบนี้ส่วนใหญ่จะลืมใส่ ; ไว้จบคำสั่ง
|
 |
 |
 |
 |
Date :
2009-11-13 12:14:15 |
By :
xbeginner01 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับเดียวจะลองดูน่ะครับ พอดีทำตามหนังสือทุกกะเบียดเลยนิ คิดว่าหนังสือถูกอะครับ
|
 |
 |
 |
 |
Date :
2009-11-13 14:28:50 |
By :
billion3 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|