มันไม่ขึ้นฐานข้อมูลให้อะครับ ช่วยดูให้หน่อย นะครับผม หมดปัญญาแล้ว
Code
<?php require_once('Connections/eye_data.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "student_login.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "student_login.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
$MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_Rs_show_pass = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_Rs_show_pass = $_SESSION['MM_Username'];
}
mysql_select_db($database_eye_data, $eye_data);
$query_Rs_show_pass = sprintf("SELECT * FROM student_member WHERE username = %s", GetSQLValueString($colname_Rs_show_pass, "text"));
$Rs_show_pass = mysql_query($query_Rs_show_pass, $eye_data) or die(mysql_error());
$row_Rs_show_pass = mysql_fetch_assoc($Rs_show_pass);
$totalRows_Rs_show_pass = mysql_num_rows($Rs_show_pass);
$colname_Rs_show_profile = "-1";
if (isset($_POST['MM_Username'])) {
$colname_Rs_show_profile = $_POST['MM_Username'];
}
mysql_select_db($database_eye_data, $eye_data);
$query_Rs_show_profile = sprintf("SELECT * FROM d_name WHERE id = %s", GetSQLValueString($colname_Rs_show_profile, "int"));
$Rs_show_profile = mysql_query($query_Rs_show_profile, $eye_data) or die(mysql_error());
$row_Rs_show_profile = mysql_fetch_assoc($Rs_show_profile);
$totalRows_Rs_show_profile = mysql_num_rows($Rs_show_profile);
$checkid = $row_Rs_show_time['id'];
$checkroom = $row_Rs_show_time['room'];
mysql_select_db($database_eye_data, $eye_data);
$query_Rs_show_time = ("SELECT id_time, d_time.time_in, d_time.time_out, d_time.status ,d_time.id ,d_time.room, d_time.date FROM d_time WHERE d_time.id = '$checkid' AND d_time.room = '$checkroom'");
$Rs_show_time = mysql_query($query_Rs_show_time, $eye_data) or die(mysql_error());
$row_Rs_show_time = mysql_fetch_assoc($Rs_show_time);
$totalRows_Rs_show_time = mysql_num_rows($Rs_show_time);
?>
<!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>STUDENT LOGIN</title>
<style type="text/css">
body {
background-color: #C0D1FF;
}
body,td,th {
color: #000000;
text-align: center;
}
</style>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
</head>
<body>
<table width="800" border="0" align="center">
<tr bgcolor="#D6D6D6">
<th scope="col"><img src="images/logo.jpg" width="800" height="150" /></th>
</tr>
<tr bgcolor="#FFFFFF">
<td><ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="#"><img src="images/home-128.png" width="128" height="128" />HOME</a> </li>
<li><a href="#"><img src="images/graduated.png" width="128" height="128" />STUDENT</a></li>
<li><a href="#"><img src="images/teacher_icon.jpg" width="128" height="128" />TEACHER</a> </li>
<li><a href="#"><img src="images/admin2.png" width="128" height="128" />ADMIN</a></li>
<li><a href="#"><img src="images/url.jpg" width="128" height="128" />ABOUT</a></li>
</ul></td>
</tr>
<tr>
<td height="300" align="left" valign="baseline" bgcolor="#D6D6D6"><form id="form1" name="form1" method="post" action="">
<p>รหัสนักศึกษา <strong><?php echo $_SESSION['MM_Username']; ?></strong> <?php echo $row_Rs_show_pass['student_name']; ?><a href="<?php echo $logoutAction ?>"> ออกจากระบบ</a></p>
<p>วันจันทร์ คาบ 1-4 ห้อง IT401</p>
<p> </p>
<table border="1" align="center">
<tr>
<td>id_time</td>
<td>time_in</td>
<td>time_out</td>
<td>status</td>
<td>id</td>
<td>room</td>
<td>date</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Rs_show_time['id_time']; ?></td>
<td><?php echo $row_Rs_show_time['time_in']; ?></td>
<td><?php echo $row_Rs_show_time['time_out']; ?></td>
<td><?php echo $row_Rs_show_time['status']; ?></td>
<td><?php echo $row_Rs_show_time['id']; ?></td>
<td><?php echo $row_Rs_show_time['room']; ?></td>
<td><?php echo $row_Rs_show_time['date']; ?></td>
</tr>
<?php } while ($row_Rs_show_time = mysql_fetch_assoc($Rs_show_time)); ?>
</table>
<center>
<p> </p>
</center></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form></td>
</tr>
<tr>
<td bgcolor="#D6D6D6"><center>
<strong>Copyright © 2014 CSIT PROJECT TEAM </strong>
</center></td>
</tr>
</table>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>
<?php
mysql_free_result($Rs_show_time);
mysql_free_result($Rs_show_pass);
mysql_free_result($Rs_show_profile);
?>
Tag : MySQL, Windows
ประวัติการแก้ไข 2014-11-07 12:20:40 2014-11-07 12:20:42
Date :
2014-11-07 12:18:36
By :
tinnapat.sathurum
View :
1199
Reply :
6
งงครบั
if (!function_exists("GetSQLValueString")) {
ทำไมต้อง ตรวจสอบแล้ว สร้าง function ข้างบน หลายหน ครั้งเดียว ก็ใช้งานได้แล้วครับ
mysql_select_db($database_eye_data, $eye_data); นี่ก็ด้วย ครั้งเดียว หลัง connect ก็ใช้ได้ทั้งโปรแกรม
Code (PHP)
<?php
mysql_free_result($Rs_show_time);
mysql_free_result($Rs_show_pass);
mysql_free_result($Rs_show_profile);
?>
mysql_free_result() มาทำตอนจบโปรแกรมไม่ได้ ประโยชน์อะไรครับ ถ้าจะทำๆ ระหว่างโปรแกรม เพื่อคืนหน่วยความจำ
print_r( ); exit; เช็คไปที่ละส่วน ให้มองเห็น ข้อมูล ที mysql_fetch_assoc() มาใช้ ครับ
ประวัติการแก้ไข 2014-11-07 13:22:02
Date :
2014-11-07 13:20:55
By :
Chaidhanan
เริ่มแรกสเต็ปของผมคือ echo SQL ที่จะคิวรี่ในโปรแกรม ไปรันบน phpMyAdmin ครับ ถ้าได้ผลลัพธ์แล้วเดี๋ยวเรามาต่อกัน
Date :
2014-11-07 13:42:14
By :
{Cyberman}
ผิดดดโพสผิดที่ 5555
ประวัติการแก้ไข 2014-11-07 13:45:04
Date :
2014-11-07 13:43:50
By :
gaowteen
Code
<?php require_once('Connections/eye_data.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "student_login.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<?php
if (!isset($_SESSION)) {
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "student_login.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
$MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_Rs_show_pass = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_Rs_show_pass = $_SESSION['MM_Username'];
}
mysql_select_db($database_eye_data, $eye_data);
$query_Rs_show_pass = sprintf("SELECT * FROM student_member WHERE username = %s", GetSQLValueString($colname_Rs_show_pass, "text"));
$Rs_show_pass = mysql_query($query_Rs_show_pass, $eye_data) or die(mysql_error());
$row_Rs_show_pass = mysql_fetch_assoc($Rs_show_pass);
$totalRows_Rs_show_pass = mysql_num_rows($Rs_show_pass);
$colname_Rs_show_profile = "-1";
if (isset($_POST['MM_Username'])) {
$colname_Rs_show_profile = $_POST['MM_Username'];
}
mysql_select_db($database_eye_data, $eye_data);
$query_Rs_show_profile = sprintf("SELECT * FROM d_name WHERE id = %s", GetSQLValueString($colname_Rs_show_profile, "int"));
$Rs_show_profile = mysql_query($query_Rs_show_profile, $eye_data) or die(mysql_error());
$row_Rs_show_profile = mysql_fetch_assoc($Rs_show_profile);
$totalRows_Rs_show_profile = mysql_num_rows($Rs_show_profile);
$checkid = $row_Rs_show_time['id'];
$checkroom = $row_Rs_show_time['room'];
mysql_select_db($database_eye_data, $eye_data);
$query_Rs_show_time ="SELECT id_time, d_time.time_in, d_time.time_out, d_time.status ,d_time.id ,d_time.room, d_time.date FROM d_time WHERE d_time.id = 544265021 AND d_time.room = 401";
$Rs_show_time = mysql_query($query_Rs_show_time, $eye_data) or die(mysql_error());
$row_Rs_show_time = mysql_fetch_assoc($Rs_show_time);
$totalRows_Rs_show_time = mysql_num_rows($Rs_show_time);
?>
<!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>STUDENT LOGIN</title>
<style type="text/css">
body {
background-color: #C0D1FF;
}
body,td,th {
color: #000000;
text-align: center;
}
</style>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
</head>
<body>
<table width="800" border="0" align="center">
<tr bgcolor="#D6D6D6">
<th scope="col"><img src="images/logo.jpg" width="800" height="150" /></th>
</tr>
<tr bgcolor="#FFFFFF">
<td><ul id="MenuBar1" class="MenuBarHorizontal">
<li><a href="#"><img src="images/home-128.png" width="128" height="128" />HOME</a> </li>
<li><a href="#"><img src="images/graduated.png" width="128" height="128" />STUDENT</a></li>
<li><a href="#"><img src="images/teacher_icon.jpg" width="128" height="128" />TEACHER</a> </li>
<li><a href="#"><img src="images/admin2.png" width="128" height="128" />ADMIN</a></li>
<li><a href="#"><img src="images/url.jpg" width="128" height="128" />ABOUT</a></li>
</ul></td>
</tr>
<tr>
<td height="300" align="left" valign="baseline" bgcolor="#D6D6D6"><form id="form1" name="form1" method="post" action="">
<p>รหัสนักศึกษา <strong><?php echo $_SESSION['MM_Username']; ?></strong> <?php echo $row_Rs_show_pass['student_name']; ?><a href="<?php echo $logoutAction ?>"> ออกจากระบบ</a></p>
<p>วันจันทร์ คาบ 1-4 ห้อง IT401</p>
<p> </p>
<table border="1" align="center">
<tr>
<td>id_time</td>
<td>time_in</td>
<td>time_out</td>
<td>status</td>
<td>id</td>
<td>room</td>
<td>date</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Rs_show_time['id_time']; ?></td>
<td><?php echo $row_Rs_show_time['time_in']; ?></td>
<td><?php echo $row_Rs_show_time['time_out']; ?></td>
<td><?php echo $row_Rs_show_time['status']; ?></td>
<td><?php echo $row_Rs_show_time['id']; ?></td>
<td><?php echo $row_Rs_show_time['room']; ?></td>
<td><?php echo $row_Rs_show_time['date']; ?></td>
</tr>
<?php } while ($row_Rs_show_time = mysql_fetch_assoc($Rs_show_time)); ?>
</table>
<center>
<p> </p>
</center></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form></td>
</tr>
<tr>
<td bgcolor="#D6D6D6"><center>
<strong>Copyright © 2014 CSIT PROJECT TEAM </strong>
</center></td>
</tr>
</table>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>
<?php
mysql_free_result($Rs_show_time);
mysql_free_result($Rs_show_pass);
mysql_free_result($Rs_show_profile);
?>
ผม select 544265021 และ 401 มันก้อจะขึ้นให้นะครับ แต่ผมต้องการให้เป็น database ของผู้ที่ log in เข้ามาอะครับ
สังเกตุที่โค๊ด Code
"SELECT id_time, d_time.time_in, d_time.time_out, d_time.status ,d_time.id ,d_time.room, d_time.date FROM d_time WHERE d_time.id = 544265021 AND d_time.room = 401";
Date :
2014-11-07 22:14:09
By :
tinnapat.sathurum
ผมคงช่วยไม่ได้หรอกครับ เพราะผมแนะนำการเขียนใหม่ให้ถูกวิธีคุณก็ไม่สนใจที่จะดู ผมบอกคุณไปคุณก็คงเอาโค๊ดไปแปะ
อย่างที่คุณทำอยู่ตอนนี้โดยไม่สนใจที่จะอ่านหรือศึกษามัน เพราะคุณเชื่อว่าโค๊ดที่คุณเอามาแปะมันทำงานได้
ซึ่งก็คงทำงานได้จริงนั่นแหล่ะครับ แต่มันอ้อมโลกเอาขยะไปใส่ในโค๊ดซะมาก
Date :
2014-11-07 22:39:59
By :
Chaidhanan
นี่แหละ เหตุผลที่ผมไม่แนำนำให้ใช้ Dreamweaver มันไม่ได้ทำให้คนฉลาดที่จะเรียนรู้ครับ แต่ทำให้คนนั้นขี้เกียจ
Date :
2014-11-08 08:00:20
By :
mr.win
Load balance : Server 01