<? ob_start(); @session_start(); include("connect.php"); $sql = mysql_query("select *from item where id_item = $_GET[id_item]"); $fetch = mysql_fetch_array($sql); ?> <style type="text/css"> <!-- .style1 { color: #FFFFFF; font-weight: bold; } --> </style> <? if($fetch[num] < $_POST[num]){ echo "<script> alert('จำนวน $fetch[name] มีไม่พอกับจำนวนที่ต้องการยืม!'); window.location='user_page.php'; </script>"; }else{ $up_equipment =mysql_query("update item set id_item = num-$_POST[num] where id_item = $_POST[id_item] " ); $count_equipment =mysql_query("update item set count = count +1 where id_item = $fetch[id_item] " ); $result=mysql_query("INSERT INTO borrow VALUES ('','$_POST[id]','$_POST[id_item]','$_POST[num]','n')"); header("location:user_page.php"); mysql_close($conn); } ob_end_flush(); ?> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-874">
Quote:<? ob_start(); @session_start(); include("connect.php"); $sql = mysql_query("select *from item where id_item = $_GET[id_item]"); $fetch = mysql_fetch_array($sql); ?>
<? ob_start(); @session_start(); include("connect.php"); $sql = "select *from item where id_item = '".$_GET[id_item]."' "; $query = mysql_query($sql) or die(mysql_error()."-".$sql); $fetch = mysql_fetch_array($query); ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง