<!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>Untitled Document</title> <script language="javascript" src="jquery.js"></script> <script type="text/javascript"> $(function(){ $("#addRow").click(function(){ $("#myTbl").append($("#firstTr").clone()); }); $("#removeRow").click(function(){ if($("#myTbl tr").size()>1){ $("#myTbl tr:last").remove(); }else{ alert("ต้องมีรายการข้อมูลอย่างน้อย 1 รายการ"); } }); }); </script> </head> <body> <form id="form1" name="form1" method="post" action=""> <table id="myTbl" width="650" border="1" cellspacing="2" cellpadding="0"> <tr id="firstTr"> <td width="119"><select name="GalleryName[]" id="GalleryName[]"> <option value="data1">data1</option> <option value="data2">data2</option> <option value="data3">data3</option> </select></td> <td width="519"><input type="text" name="selSelect[]" id="selSelect[]" /></td> </tr> </table> <br /> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <button id="addRow" type="button">+</button> <button id="removeRow" type="button">-</button> <button id="Submit" type="submit">Submit</button> </td> </tr> </table> </form> </body> </html>
<? $GalleryName = array(); $GalleryName=$_POST['GalleryName']; print_r($GalleryName); $selSelect = array(); $selSelect=$_POST['selSelect']; print_r($selSelect); ?>
<? for($i=0;$i<count($_POST["txtSiteName"]);$i++) { echo "txtSiteName $i = ".$_POST["txtSiteName"][$i]."<br>"; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง