<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Card_Member</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head> <body> <form name="frmSearch" method="get" action="<?=$_SERVER['SCRIPT_NAME'];?>"> <table width="599" border="1"> <tr> <th>เลขที่สมาชิก : <input name="txtKeyword" type="text" id="txtKeyword" value="<?=$_GET["txtKeyword"];?>" size="0" maxlength="8"> <input type="submit" value="Search"></th> </tr> </table> </form> <?php $dsn = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=c:\\agcobcad\\database;Exclusive=NO;collate=Machine;NULL=NO;DELETED=YES;BACKGROUNDFETCH=NO;"; $objConnect = odbc_connect($dsn,"","")or die("can not connect"); //*** Update Condition ***// if($_GET["Action"] == "Save") { for($i=1; $i<=$_POST["hdnLine"]; $i++) { $strSQL = "UPDATE t_print_book SET "; $strSQL .="isstatus = '".$_POST["txtUsed$i"]."' "; $strSQL .="WHERE memberid = '".$_POST["hdnCustomerID$i"]."' and trandate = '".$_POST["CountryCode$i"]."' "; $objExec = odbc_exec($objConnect, $strSQL); } } $strSQL = "SELECT * FROM t_print_book WHERE (memberid LIKE '%".$_GET["txtKeyword"]."%' )and contractid=' ' "; $objExec = odbc_exec($objConnect, $strSQL) or die ("Error Execute [".$strSQL."]"); //$rows=odbc_num_rows($objExec ); ?> <form name="frmMain" method="post" action="Card_Member1.php?Action=Save"> <table width="600" border="1"> <tr> <th width="91"> LindID</th> <th width="98"> Memberid </th> <th width="198"> trandate </th> <th width="59"> trantype </th> <th width="71"> isstatus </th> </tr> <?php $i =0; while($objResult = odbc_fetch_array($objExec)){ $i = $i + 1; ?> <tr> <td align="center"><input type="hidden" name="hdnCustomerID<?php echo $i;?>" size="5" value="<?=$objResult["memberid"];?>"><?=$objResult["lineid"];?></td> <td align="center"><?=$objResult["memberid"];?></td> <td align="center"><input type="text" name="CountryCode<?php echo $i;?>" size="8" value="<?php echo $objResult["trandate"];?>"readonly="true"></td> <td align="center"><?=$objResult["trantype"];?></td> <td align="center"><input type="text" name="txtUsed<?php echo $i;?>" size="1" value="<?php echo $objResult["isstatus"];?>"></td> </tr> <? } ?> </table align="center"> <p> <input type="submit" name="submit" value="submit"> <input type="reset" name="Reset" value="Reset"> <input type="hidden" name="hdnLine" value="<?php echo $i;?>"> </p> </form> <?php odbc_close($objConnect); ?> </body> </html>
<table> <tr><th>.....</th></tr> <?php if(mysql_num_rows(objQuery)){ while(....){ .... .... } }else{ echo "<tr><td colspan="x">ไม่มีข้อมูล</td></tr>"; } ?> </table>
<table> <tr><th>.....</th></tr> <?php if( เช็คrow>0 ){ while(....){ .... .... } }else{ echo "<tr><td colspan="x">ไม่มีข้อมูล</td></tr>"; } ?> </table>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง