<?php include("include/connectdb.php"); echo "<meta http-equiv = \"content-type\" content = \"text/html;charset=utf-8\" />"; if(empty($_REQUEST["user"]) || empty($_REQUEST["pass"])) { echo "กรอกข้อมูลไม่ครบ"; echo "<meta http-equiv = \"refresh\" content = \"3;url=register_form.php\" />"; } $user = $_REQUEST["user"]; $pass = $_REQUEST["pass"]; $sql = "SELECT COUNT(*) FROM member WHERE username = '$user'"; $result = mysql_query($sql) or die (mysql_error()); $row = mysql_fetch_array($result); $num_user = $row["count(*)"]; if ($num_user != 0) { echo "ชื่อผู้ใช้ซ้ำ"; }
$result = mysql_query($sql) or die (mysql_error()); $row = mysql_fetch_array($result); $num_user = $row["count(*)"]; <?php include("include/connectdb.php"); echo "<meta http-equiv = \"content-type\" content = \"text/html;charset=utf-8\" />"; if(empty($_REQUEST["user"]) || empty($_REQUEST["pass"])) { echo "กรอกข้อมูลไม่ครบ"; echo "<meta http-equiv = \"refresh\" content = \"3;url=register_form.php\" />"; } $user = $_REQUEST["user"]; $pass = $_REQUEST["pass"]; $sql = "SELECT COUNT(*) FROM member WHERE username = '$user'"; $result = mysql_query($sql) or die (mysql_error()); $row = mysql_fetch_array($result); $num_user = $row["count(*)"]; if ($num_user != 0) { echo "ชื่อผู้ใช้ซ้ำ"; } /*$sql = "INSERT INTO member(username,password) VALUES('$user','$pass')"; mysql_query($sql) or die (mysql_error());*/ ?> <!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> <title> Register </title> <meta http-equiv = "content-type" content = "text/html;charset=utf-8" /> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> </head> <body> <a href = "register_form.php">Back</a> </body> </html>
<?php include("include/connectdb.php"); echo "<meta http-equiv = \"content-type\" content = \"text/html;charset=utf-8\" />"; if(empty($_REQUEST["user"]) || empty($_REQUEST["pass"])) { echo "กรอกข้อมูลไม่ครบ"; echo "<meta http-equiv = \"refresh\" content = \"3;url=register_form.php\" />"; } $user = $_REQUEST["user"]; $pass = $_REQUEST["pass"]; $sql = "SELECT COUNT(*) FROM member WHERE username = '$user'"; $result = mysql_query($sql) or die (mysql_error()); $row = mysql_fetch_array($result); $num_user = $row["count(*)"]; if ($num_user != 0) { echo "ชื่อผู้ใช้ซ้ำ"; } /*$sql = "INSERT INTO member(username,password) VALUES('$user','$pass')"; mysql_query($sql) or die (mysql_error());*/ ?> <!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> <title> Register </title> <meta http-equiv = "content-type" content = "text/html;charset=utf-8" /> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> </head> <body> <a href = "register_form.php">Back</a> </body> </html>
$user = $_REQUEST["user"]; $pass = $_REQUEST["pass"]; $sql = "SELECT COUNT(*) FROM member WHERE username = '$user'"; $result = mysql_query($sql) or die (mysql_error()); $row = mysql_fetch_array($result); $num_user = $row["count(*)"]; if ($num_user != 0) { echo "ชื่อผู้ใช้ซ้ำ"; }
$user = $_REQUEST["user"]; $pass = $_REQUEST["pass"]; $sql = "SELECT COUNT(*) FROM member WHERE username = '$user'"; $result = mysql_query($sql) or die (mysql_error()); $num_user =mysql_num_rows($result ); if ($num_user >=1) { echo "ชื่อผู้ใช้ซ้ำ"; }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง