Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\AppServ\www\dormitory\login.php:2) in C:\AppServ\www\testsession\login.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\dormitory\login.php:2) in C:\AppServ\www\testsession\login.php on line 3
username และ password ถูกต้อง
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\AppServ\www\testss\login.php:2) in C:\AppServ\www\testss\login.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\testss\login.php:2) in C:\AppServ\www\testss\login.php on line 3
username และ password ถูกต้อง
<?
session_start();
$host = "127.0.0.1";
$user = "root";
$passwd = "abc123";
$dbname = "testss";
mysql_connect($host,$user,$passwd) or die("ติดต่อ Host ไม่ได้");
mysql_select_db($dbname) or die("ติดต่อฐานข้อมูลไม่ได้");
$sql = "select * from customer where username='$inputUserName' and password='$inputPassword' ";
$dbquery = mysql_db_query($dbname, $sql);
$num_rows = mysql_num_rows($dbquery);
if($num_rows==1)
{