<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>ระบบฐานข้อมูลการขึ้นทะเบียนเกษตรกร</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <script language="javascript"> function checkform() { submitResult = true; username = document.getElementById('username'); password = document.getElementById('password'); confirmpass = document.getElementById('confirmpass'); if(submitResult && (username.value == "")) { submitResult = false; alert('กรุณากรอกรหัสประจำประชาชน ด้วยค่ะ'); document.form1.username.focus(); } if(submitResult && (password.value == "")) { submitResult = false; alert('กรุณากรอกรหัสผ่านุ ด้วยค่ะ'); document.form1.password.focus(); } if(submitResult && (password.value != confirmpass.value)) { submitResult = false; alert('กรุณายืนยัน Password ให้ถูกต้องตรงกัน ด้วยค่ะ'); document.form1.confirmpass.focus(); }else{ } return submitResult; } </script> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <table width="300" height="200" border="2" align="center" cellpadding="0" cellspacing="0" bordercolor="#0099FF"> <tr> <td> <form name="form1" method="post" action="addregister.php" onSubmit="JavaScript:return checkform();"> <table width="269" height="158" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="37" colspan="2"><div align="center" class="style1">สมัครสมาชิก</div></td> </tr> <tr> <td width="134" height="22"><div align="right" class="style1">รหัสประจำตัวประชาชน:</div></td> <td width="135"><label> <input name="username" type="text" id="username" size="15"> </label></td> </tr> <tr> <td><div align="right" class="style1">รหัสผ่าน:</div></td> <td><label> <input name="password" type="password" id="password" size="15"> </label></td> </tr> <tr> <td height="13"><div align="right"><span class="style1">ยืนยันรหัสผ่าน:</span></div></td> <td height="13"><label> <input name="confirmpass" type="password" id="confirmpass" size="15"> </label></td> </tr> <tr> <td height="33" colspan="2"><div align="center"> <label> <input type="submit" name="Submit" value="สมัครสมาชิก"> </label> <label> <input name="Submit2" type="button" onClick="javascript:history.back();" value="ยกเลิก"> </label> <input name="status" type="hidden" id="status" value="User"> </div></td> </tr> </table> </form> </td> </tr> </table> <p> </p> </body> </html>
<html> <head> <title>เพิ่มข้อมูลผู้ดูและรบบ</title> </head> <body> <? if($_POST["username"]!=""){ $objConnect = mysql_connect("localhost","root","1234") or die("Error Connect to Database"); $objDB = mysql_select_db("register"); $strSQL = "INSERT INTO admin "; $strSQL .="(username,password,status) "; $strSQL .="VALUES "; $strSQL .="('".$_POST["username"]."','".$_POST["password"]."','".$_POST["status"]."') "; $objQuery = mysql_query($strSQL); if($objQuery) { echo "<script language='javascript'>alert('เพิ่มข้อมูลเรียบร้อยแล้วค่ะ กรุณารอสักครู่');</script>"; echo "<meta http-equiv=refresh content=0;URL=regisok.php>"; } else { echo "Error Save [".$strSQL."]"; } mysql_close($objConnect); } ?> </body> </html>
<html> <head> <title>เพิ่มข้อมูลผู้ดูและรบบ</title> </head> <body> <? if($_POST["username"]!=""){ $objConnect = mysql_connect("localhost","root","1234") or die("Error Connect to Database"); $objDB = mysql_select_db("register"); $strSQL = "INSERT INTO admin "; $strSQL .="(username,password,status) "; $strSQL .="VALUES "; $strSQL .="('".$_POST["username"]."','".$_POST["password"]."','".$_POST["status"]."') "; $objQuery = mysql_query($strSQL); if($objQuery) { echo "<script language='javascript'>alert('เพิ่มข้อมูลเรียบร้อยแล้วค่ะ กรุณารอสักครู่');</script>"; #echo "<meta http-equiv=refresh content=0;URL=regisok.php>"; echo 'USERNAME : '.$_POST['username'].'<br>PASSWORD : '.$_POST['password'].'<br>'; } else { echo "Error Save [".$strSQL."]"; } mysql_close($objConnect); } ?> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง