ช่วยแก้ให้ทีครับ
เมื่อคลิกเมนูผู้ดูแลระบบ มันดึงข้อมูลมาปกติ พอกด del edit เพิ่มข้อมูล มันไม่ยอมดึงข้อมูลมารีเฟช ช่วยดูให้ทีครับ งงมานานแล้วครับ
โพสต์ครั้งแรกผิดประการใด ขอโทษด้วยครับ
ไฟล์ได้แนบไปแล้วครับ ^^
config.php
<?php
$host = "localhost";
$us = "root";
$pw = "12345";
$db = "test";
$link = mysql_connect($host,$us,$pw)or die ("Could not connect to MySQL");
mysql_select_db($db)or die ("Could not connect to Database");
?>
Content.php
<div class="tag-all">
<p> In hac habitasse platea dictumst. Duis porttitor. Sed vulputate elementum nisl. Vivamus et mi at arcu mattis iaculis. Nullam posuere tristique tortor. In bibendum. Aenean ornare, nunc eget pretium porttitor, sem est pretium leo, non euismod nulla dui non diam. Pellentesque dictum faucibus leo. Vestibulum ac ante. Sed in est. Sed sodales nisl sit amet augue. Donec ultrices, augue ullamcorper posuere laoreet, turpis massa tristique justo, sed egestas metus magna sed purus. Fusce eleifend, dui ut posuere auctor, justo elit posuere sapien, at blandit enim quam fringilla mi.</p>
<p> In hac habitasse platea dictumst. Duis porttitor. Sed vulputate elementum nisl. Vivamus et mi at arcu mattis iaculis. Nullam posuere tristique tortor. In bibendum. Aenean ornare, nunc eget pretium porttitor, sem est pretium leo, non euismod nulla dui non diam. Pellentesque dictum faucibus leo. Vestibulum ac ante. Sed in est. Sed sodales nisl sit amet augue. Donec ultrices, augue ullamcorper posuere laoreet, turpis massa tristique justo, sed egestas metus magna sed purus. Fusce eleifend, dui ut posuere auctor, justo elit posuere sapien, at blandit enim quam fringilla mi.</p>
</div>
edit_del_member.js
/*-----------------------SHOW----------------------*/
function show_members(show_id){
//alert(show_id);
var str=Math.random();
var datastring='str='+str + '&show_id='+show_id ;
$.ajax({
type:'POST',
url:'edit_del_sql.php',
data:datastring,
beforeSend: function(){
$("#show_id").html("Plese wait...");
},
success:function(data){
$("#show_id").html(data);
}
});
}
/*-----------------------EDIT----------------------*/
function edit_members(edit_id){
//alert(edit_id);
var str=Math.random();
var username = document.myform.username.value;
var password = document.myform.password.value;
var email = document.myform.email.value;
var datastring='str='+str + '&edit_id='+edit_id + '&username='+username+ '&password='+password + '&email='+email;
$.ajax({
type:'POST',
url:'edit_del_sql.php',
data:datastring,
beforeSend: function(){
$("#show_id").html("Plese wait...");
},
success:function(data){
window.location.reload("view_edit_del_memberdata.php");
}
});
}
/*-----------------------DEL----------------------*/
function del_members(del_id){
//alert(edit_id);
var str=Math.random();
var datastring='str='+str + '&del_id='+del_id;
$.ajax({
type:'POST',
url:'edit_del_sql.php',
data:datastring,
beforeSend: function(){
$("#show_id").html("Plese wait...");
},
success:function(data){
window.location.reload("view_edit_del_memberdata.php");
}
});
}
/*-----------------------INSERT----------------------*/
function insertsql(){
var str=Math.random();
var user = $("#user").val();
var password = $("#password").val();
var email = $("#email").val();
var datastring='str='+str + '&user='+user+ '&password='+password + '&email='+email;
//alert(datastring);
$.ajax({
type:'POST',
url:'edit_del_sql.php',
data:datastring,
beforeSend: function(){
$("#show_id").html("Plese wait...");
},
success:function(data){
window.location.reload("view_edit_del_memberdata.php");
}
});
}