i write below code for sending id to another php file
function selectCheckBox(k) {
answer = confirm("Do you really want check?");
if(answer == true) {
var e = document.Check.elements.length;
var cnt = 0;
total = document.Check.elements[k].value;
PostVar = "id=" + total;
alert(PostVar);
makePostRequest("check.php", PostVar);
}
}
in this code i got PostVar value as id=121
in check.php code is as shown
require 'dbconnect.php';
$id=$_REQUEST['id'];
$query="update members set status_admin='Yes' where userid='$id'";
$result=mysql_query($query);
but results in the mysql table are not updated
please guide me
Few Suggestions For Debugging
$_REQUESTusingprint_r($_REQUEST)exit($query)mysql_query($query) or die(mysql_error())And put this on top of your script to see any other errors from current page or included pages: