<script> function fncCheck(){ var param ="code="+document.getElementById('code').value; var xmlHttp =GetXmlHttpObject(); if(xmlHttp== null){ alert("your browser does not support "); return; } xmlHttp.onreadystatechange = function(){ if(xmlHttp.readyState ==4 && xmlHttp.status==200){ var val =xmlHttp.responseText; if(val ==0) alert("ไม่มีค่านี้ในฐานข้อมูล"); else document.getElementById('showCode').innerHTML=val; } } xmlHttp.open("GET","check.php?"+param,true); xmlHttp.send(null); } function GetXmlHttpObject(){ var xmlHttp =null; if (window.XMLHttpRequest) { // Mozilla, Safari,... xmlHttp = new XMLHttpRequest(); if (xmlHttp.overrideMimeType) { xmlHttp.overrideMimeType('text/html'); } } else if (window.ActiveXObject) { // IE try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } return xmlHttp; } </script> <input type="text" id="code" size=15> <input type="button" value="Check" onclick="javascript:fncCheck()"> <div id="showCode"></div>
<?php //This is code test // echo "TEST GET HTTP :".$_GET[code]; include ("directory config connect"); $code = $_GET[code]; $sql =mysql_query("select * from tbl_name where field_name=$code") or die(mysql_error()); $res= mysql_fetch_array($sql); $num = mysql_num_rows($sql); if($num>0){ echo $res[field_name]; }else{ echo 0; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง