Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Cuba buat debug output untuk username dan password bagi kedua dua data form dan db tengok sama atau tidak:
echo $myusername;
echo $mypassword;
echo $result;
psstt dah ok lum ni?huwaaaaaaa..
sy rse kne clearkn sume ni dlu,,
tq kwn2 y telh bersush payah menolong,,
xdpt nk bls rsenye,,
sy nk out dlu,,
tqvm!!!!!
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\club1221_DW\prog\semak.php:8) in C:\xampp\htdocs\club1221_DW\prog\semak.php on line 36
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\club1221_DW\prog\semak.php:8) in C:\xampp\htdocs\club1221_DW\prog\semak.php on line 36
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\club1221_DW\prog\semak.php:8) in C:\xampp\htdocs\club1221_DW\prog\semak.php on line 39
if(mysql_num_rows($result) > 0){
// Register $myusername, $mypassword and redirect to file "login_success.php"
session_start();
$_SESSION['username'] = $myusername;
$_SESSION['password'] = $mypassword;
header("location:berjaya.php");
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<?
session_start();
if (($_SESSION['username'] != '') && ($_SESSION['password'] != '')){
echo 'Login Success'; // Ganti dengan apa yang patut
}
else echo 'Cannot Login'; // ini boleh ganti dengan apa yang patut
?>
<?
session_start();
if (($_SESSION['username'] != '') && ($_SESSION['password'] != '')){
echo 'Login Success'; // Ganti dengan apa yang patut
}
else echo 'Cannot Login'; // ini boleh ganti dengan apa yang patut
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>