$logname = $_REQUEST['logname']; ... $hobby4 = $_REQUEST['hobby4'];
$logname = $_REQUEST['logname'];
<!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><form action="insert.php" method="post"> <table width="500" border="1"> <tr> <td>user</td> <td><label> <input type="text" name="user" id="user" /> </label></td> </tr> <tr> <td>name-lastname</td> <td><label> <input type="text" name="name" id="name" /> </label></td> </tr> <tr> <td>email</td> <td><label> <input type="text" name="email" id="email" /> </label></td> </tr> <tr> <td>address</td> <td><label> <input type="text" name="address" id="address" /> </label></td> </tr> <tr> <td>tell</td> <td><input type="text" name="tell" id="tell" /></td> </tr> <tr> <td> </td> <td><label> <input type="submit" name="click" id="click" value="Submit" /> <input type="reset" name="Reset" id="button" value="Reset" /> </label></td> </tr> </table></form> </body> </html>
<? $logname=$_POST["user"]; $name=$_POST["name"]; $email=$_POST["email"]; $address=$_POST["address"]; $tell==$_POST["tell"]; $host="localhost"; $user="root"; $pass="1234"; mysql_connect($host,$user,$pass) or die("can not connect server"); mysql_select_db($dbname) or die("can not connect db"); $sql="insert into userinfo (logname,name,email,address,tell) value('$logname','$name','$email','$address','$tell')"; $result=mysql_query($sql); if($result){ echo "ok"; } else{ echo "on"; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง