<? for($k=0; $k<count($text1);$k++) { $text_name = $text1[$k]; // เอาตัวแปรนี้ไปเซฟเลย echo "text ".($k+1)." = ".$text_name."<br>"; } ?>
<!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> </head> <body> <?php if (empty($_POST)){ ?> <form id="form1" name="form1" method="post" action=""> <p> <label for="textfield"></label> <input type="text" name="txt[]" id="textfield" /> </p> <p> <input type="text" name="txt[]" id="textfield2" /> </p> <p> <input type="text" name="txt[]" id="textfield3" /> </p> <p> <input type="submit" name="button" id="button" value="Submit" /> </p> </form> <?php } else { ?> <?php $txt = $_POST['txt']; foreach($txt as $value): echo $value; endforeach; ?> <?php } ?> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง