<?php require_once('Connections/myconnection.php'); include("header.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_Recordset1 = "-1"; if (isset($_POST['word'])) { $colname_Recordset1 = $_POST['word']; } mysql_select_db($database_myconnection, $myconnection); $query_Recordset1 = sprintf("SELECT * FROM data_customers WHERE ctm_name LIKE %s", GetSQLValueString("%" . $colname_Recordset1 . "%", "text")); $Recordset1 = mysql_query($query_Recordset1, $myconnection) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); ?> <!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>After Sale Service</title> </head> <body> <p> </p> <p> </p> <center><b><p>ค้นหา</p></b></center> <table border="0" align="center"> <tr> <td align="center" bgcolor="#999999">ลำดับ</td> <td align="center" bgcolor="#999999">ชื่อ</td> <td align="center" bgcolor="#999999">นามสกุล</td> <td align="center" bgcolor="#999999">ยี่ห้อมือถือ</td> <td align="center" bgcolor="#999999">รุ่น</td> <td align="center" bgcolor="#999999">เบอร์ติดต่อ</td> <td align="center" bgcolor="#999999">วันที่มาซ่อม</td> <td align="center" bgcolor="#999999">อาการ</td> </tr> <?php do { ?> <tr> <td><?php echo $row_Recordset1['ctm_id']; ?></td> <td><?php echo $row_Recordset1['ctm_name']; ?></td> <td><?php echo $row_Recordset1['ctm_surname']; ?></td> <td><?php echo $row_Recordset1['ctm_product']; ?></td> <td><?php echo $row_Recordset1['ctm_model']; ?></td> <td><?php echo $row_Recordset1['ctm_tel']; ?></td> <td><?php echo $row_Recordset1['ctm_date']; ?></td> <td><?php echo $row_Recordset1['ctm_fix']; ?></td> </tr> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> </table> </body> </html> <?php mysql_free_result($Recordset1); ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง