|
|
|
Parse error: syntax error, unexpected $end in __________.php on line 67 (บรรทัดสุดท้าย) |
|
|
|
|
|
|
|
Code (PHP)
if ($username&&$password)
{
คุณเปิดตัวนี้แล้วลืมปิด } ข้างล่างสุดครับ
|
|
|
|
|
Date :
2012-02-26 00:01:54 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php
$username = $_POST['username'];
$password = $_POST['password'];
if ($username&&$password)
{
$connect = mysql_connect('localhost','root','1234') or die('Could not connect ');
mysql_select_db('phplogin')or die ('Could not find db');
$query = mysql_query ("SELECT * FROM users WHERE username='$username' ");
$numrows = mysql_num_rows($query);
$objQuery = mysql_query($strSQL);
$objResult = mysql_fetch_array($objQuery);
if(!$objResult)
{
echo "Username and Password ไม่ถูกต้อง!";
}
else
{
$_SESSION["UserID"] = $objResult["UserID"];
$_SESSION["status"] = $objResult["status"];
session_write_close();
if($objResult["status"] == "admin")
{
header("location:home_admin.php");
}
else
{
header("location:home.php");
}
}
mysql_close();
}
?>
|
|
|
|
|
Date :
2012-02-26 07:45:57 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|