<!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>ลบข้อมูลสมาชิก</title> </head> <body> <? require "config.php"; require "connect.php"; mysql_query("delete from member where member_id ='".$_GET['id']."' limit 1 "); ?> <script> alert("ลบข้อมูลเรียบร้อย"); window.location='index.php?option=com_jumi&view=application&fileid=9'; </script> </body> </html>
<?php $db=new mysqli('host', 'user', 'psw', 'dbname'); if(isset($_POST['type'])){ switch($_POST['type']){ case 'delete': $db->query($sql='delete from table where id='.intval($_POST['id'])) or die("$sql<br>" . $db->error); echo 'OK'; break; case 'insert': ////// echo 'OK'; break; case 'update': ////// echo 'OK'; break; } exit; } ?> <!doctype html><html><head> <script src="jquery.js"></script> <script> $(document).ready(function(){ $('button').click(function(e){ var tr = $(this).parent().parent(); $,ajax({ type: 'POST', data: {type: 'delete', id: $(this).data('id') }}).done(function(msg){ if(msg == 'OK') $(tr).remove(); else alert(msg); }); }); }); </script> </head> <body> <table> <tr><td><button type="button" data-id="1"></td></tr> <tr><td><button type="button" data-id="2"></td></tr> </table> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง