|
|
|
รบกวนเรื่อง Login เช็ก 2 เทเบิลจากฟอร์มเดียวน่ะค่ะ |
|
|
|
|
|
|
|
ทำไมคุณจะต้อง if ด้วยครับ อันที่จริงถ้ามันมี record แสดงว่า login อ่านแล้วครับ
Code (PHP)
$data=mysql_fetch_array($result);
if($data)
session_start();
$_SESSION['Username']=$Username;
header("Location: Booking.php?Username=$Username");//add session
}else{
header("Location: index.php?error=1");
}
|
|
|
|
|
Date :
2012-02-07 05:57:03 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
มันไม่อ่าน else เลยอ่ะค่ะ มันยิงไปหน้า booking.php เลยอ่ะค่ะ
|
|
|
|
|
Date :
2012-02-07 06:24:54 |
By :
finalthanks |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
คุณลอง $sql เอาค่าไปรันใน phpMyAdmin ดูครับ มันมี Record หรือไม่
|
|
|
|
|
Date :
2012-02-07 06:28:56 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
มีค่ะ ><"
|
|
|
|
|
Date :
2012-02-07 06:41:46 |
By :
finalthanks |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
$data=mysql_fetch_array($result);
if($data)
echo "This case";
session_start();
$_SESSION['Username']=$Username;
header("Location: Booking.php?Username=$Username");//add session
}else{
header("Location: index.php?error=1");
}
echo "This case"; ถ้ามันเข้าตัวนี้ แสดงว่ามี record และทำงานถูกต้อง
|
|
|
|
|
Date :
2012-02-07 06:47:02 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
อ่าน This case ค่ะ
แต่ไม่เข้า else ทั้งๆ ที่กรอกผิด TT______TT
|
|
|
|
|
Date :
2012-02-07 07:08:02 |
By :
finalthanks |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ได้แล้วค่ะ ๆ ๆ ขอบคุณค่าาา ^^
|
|
|
|
|
Date :
2012-02-07 07:27:42 |
By :
finalthanks |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
อ้าว ตกลงผิดอะไรครับ
|
|
|
|
|
Date :
2012-02-07 08:34:54 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|