แก้โค้ด สถานะ ค่ะ
ถาม-ตอบ แนะนำไอเดียว โค้ดตัวอย่าง แนวทาง วิธีแก้ปัญหา แก้โค้ด สถานะ ค่ะ
แก้โค้ด สถานะ ค่ะ
Copy
อยากให้ตรงสถานะ แสดงแค่คนที่ออกจากจากสมาชิก ต้องเขียนยังไง ค่ะ <?php require_once('../Connections/connection.php'); ?> <?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; } } $colname_mem = "-1"; if (isset($_POST['word'])) { $colname_mem = $_POST['word']; } mysql_select_db($database_connection, $connection); $query_mem = sprintf("SELECT * FROM members WHERE Member_date LIKE %s", GetSQLValueString("%" . $colname_mem . "%", "date")); $mem = mysql_query($query_mem, $connection) or die(mysql_error()); $row_mem = mysql_fetch_assoc($mem); $totalRows_mem = mysql_num_rows($mem); ?> <!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>ศูนย์ข้าวชุมชนตำบลโพกรวม</title> <style type="text/css"> a:link { color: #000; text-decoration: none; } a:visited { text-decoration: none; color: #000; } a:hover { text-decoration: none; color: #F00; } a:active { text-decoration: none; color: #F00; } </style> </head> <body bgcolor="#E0FFFF"> <center><img src="../img/111.jpg" height="250" width="1024"> <br /><br /> <form id="form1" name="form1" method="post" action="report_member.php"> <h2>รายงานข้อมูลสมาชิกทั้งหมด </h2><br> <label for="word">ค้นหา : </label> <input type="text" name="word" id="word" value="2015-11-1" /> <input type="submit" name="button" id="button" value="ค้นหา" /> <br><br /> <table width="970" border="0" align="center"> <tr> <td align="right"> <a href="report.php"> กลับหน้ารายงาน </a> / <a href="admin_page.php">กลับเมนูหลัก</a> <img src="../img/gif21.gif" /></td> </tr> </table> <table border="1" width="1000"> <tr align="center" bgcolor="#CDB7B5"> <td>รหัสประจำตัวประชาชน</td> <td>ชื่อ - นามสกุล</td> <td>ที่อยู่</td> <td>อายุ</td> <td>เพศ</td> <td>สถานะสมาชิก</td> <td>วัน เดือน ปี </td> </tr> <?php do { ?> <tr align="center" bgcolor="#EEDFCC"> <td><?php echo $row_mem['Members_id']; ?></td> <td><?php echo $row_mem['Members_name']; ?></td> <td><?php echo $row_mem['Members_address']; ?></td> <td><?php echo $row_mem['Members_age']; ?></td> <td><?php echo $row_mem['Members_sex']; ?></td> <td><?php echo $row_mem['Members_status']; ?></td> <td><?php echo date("d-m-Y",strtotime($row_mem['Member_date'])); ?></td> </tr> <?php } while ($row_mem = mysql_fetch_assoc($mem)); ?> </table> </form> </center> </body> </html> <?php mysql_free_result($mem); ?>
Monchusa
125.26.115.xxx
07-12-2015
20:50:06
คำแนะนำ และการใช้งาน
สมาชิก กรุณา ล็อกอินเข้าระบบ เพื่อตั้งคำถามใหม่ หรือ ตอบคำถาม สมาชิกใหม่ สมัครสมาชิกได้ที่ สมัครสมาชิก
- ถาม-ตอบ กรุณา ล็อกอินเข้าระบบ
เว็บไซต์ของเราให้บริการเนื้อหาบทความสำหรับนักพัฒนา โดยพึ่งพารายได้เล็กน้อยจากการแสดงโฆษณา
โปรดสนับสนุนเว็บไซต์ของเราด้วยการปิดการใช้งานตัวปิดกั้นโฆษณา (Disable Ads Blocker) ขอบคุณครับ