<? $option="SELECT* FROM performance "; $acc11 = mysql_query($option) ; $row=1; echo '<table border="0" cellspacing="2">'; while($rq11 = mysql_fetch_array($acc11)){ if($row!=2){ echo '<tr>';} echo '<td>'; echo "<input type='checkbox' name='std[]' value='$rq11[0]'></td><td>".$rq11[1]."</td><td><input name='how'type='text' size='2'maxlength='2'/>"." "."คน".""; echo '</td>'; if($row!=2) { $row++; } else{echo "</tr>"; $row=1;} } echo '</table>'; ?>
<html> <head> <title>ThaiCreate.Com PHP & MySQL Tutorial</title> </head> <body> <script language="JavaScript"> function onSend() { if(confirm('Do you want to send mail ?')==true) { return true; } else { return false; } } </script> <form name="frmMain" action="php_mail2.php" method="post" OnSubmit="return onSend();"> <? $objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database"); $objDB = mysql_select_db("mydatabase"); $strSQL = "SELECT * FROM customer"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); ?> <table width="600" border="1"> <tr> <th width="91"> <div align="center">CustomerID </div></th> <th width="98"> <div align="center">Name </div></th> <th width="198"> <div align="center">Email </div></th> <th width="97"> <div align="center">CountryCode </div></th> <th width="59"> <div align="center">Budget </div></th> <th width="71"> <div align="center">Used </div></th> <th width="30"> <div align="center">Delete </div></th> </tr> <? while($objResult = mysql_fetch_array($objQuery)) { ?> <tr> <td><div align="center"><?=$objResult["CustomerID"];?></div></td> <td><?=$objResult["Name"];?></td> <td><?=$objResult["Email"];?></td> <td><div align="center"><?=$objResult["CountryCode"];?></div></td> <td align="right"><?=$objResult["Budget"];?></td> <td align="right"><?=$objResult["Used"];?></td> <td align="center"><input type="checkbox" name="chkSend[]" value="<?=$objResult["Email"];?>"></td> </tr> <? } ?> </table> <? mysql_close($objConnect); ?> <input type="submit" name="btnDelete" value="Delete"> </form> </body> </html>
<html> <head> <title>ThaiCreate.Com PHP & MySQL Tutorial</title> </head> <body> <? $objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database"); $objDB = mysql_select_db("mydatabase"); for($i=0;$i<count($_POST["chkSend"]);$i++) { if($_POST["chkSend"][$i] != "") { echo $_POST["chkSend"][$i]."<br>"; } } mysql_close($objConnect); ?> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง