Dataprocessor is not sending $_GET variables

I have a simple grid script which gets data from a mySQL database and has to update/insert or delete records back into the mySQL database.
Getting the data on the grid is working fine, but update, add and delete are not working. After bit of investigating it seems that the update script (UpdateUsers.php)is not receiving the $_GET var’s. (if I’m putting hard values into the script it’s working)

I hope someone can help me. It’s probably a small thing but I’m looking already for more than one day at this.

Here is my code:
frmUserMaintenance.php:

Usermaintenance
<script src="classes/dhtmlx/dhtmlx.js"></script>
<link rel="stylesheet" type="text/css" href="classes/dhtmlx/dhtmlx.css"/>

<script type="text/javascript">

    var mygrid,myDP;
        function doOnLoad(){
            mygrid = new dhtmlXGridObject('gridbox');
            mygrid.setImagePath("classes/dhtmlx/imgs/");
            mygrid.setHeader("Gebruiker,Wachtwoord,Gebruikersgroep,WerknemerId,Geblokkeerd,Actief");
            mygrid.setInitWidths("200,80,*");
            mygrid.setColTypes("ed,ed,ed,ed,ed,ed");
            mygrid.setColSorting("str,str,str,str,str,str");
            mygrid.init();
            mygrid.loadXML("data/GetUsers.php");
     
            myDP = new dataProcessor("data/UpdateUsers.php");
            myDP.enableDebug(true)
            myDP.init(mygrid);

        }

</script>

Add row

Remove Selected Row

GetUsers.php

<?php error_reporting(E_ALL ^ E_NOTICE); $res=mysql_connect($_SESSION['SvrAdr'],$_SESSION['ConUser'],$_SESSION['ConPw']); mysql_select_db("deha_prs"); //include XML Header (as response will be in xml format) header("Content-type: text/xml"); //encoding may be different in your case echo('<?xml version="1.0" encoding="utf-8"?>');
//start output of data
echo '<rows id="0">';

//output data from DB as XML
$sql = "SELECT  * from tbl_user";
$res = mysql_query ($sql);
		
if($res){
	while($row=mysql_fetch_array($res)){
		//create xml tag for grid's row
		echo ("<row id='".$row['UserId']."'>");
		print("<cell><![CDATA[".$row['UserName']."]]></cell>");
		print("<cell><![CDATA[".$row['Password']."]]></cell>");
		print("<cell><![CDATA[".$row['UserLevelId']."]]></cell>");
		print("<cell><![CDATA[".$row['WerknemerId']."]]></cell>");
		print("<cell><![CDATA[".$row['Blocked']."]]></cell>");
		print("<cell><![CDATA[".$row['Active']."]]></cell>");
		print("</row>");
	}
}else{
//error occurs
	echo mysql_errno().": ".mysql_error()." at ".__LINE__." line in ".__FILE__." file<br>";
}
echo '</rows>';

?>

UpdateUsers.php

<?php $res=mysql_connect($_SESSION['SvrAdr'],$_SESSION['ConUser'],$_SESSION['ConPw']); mysql_select_db("deha_prs"); function add_row(){ global $newId; $sql = "INSERT INTO tbl_user(UserName, Password, UserLevelId, WerknemerId, Blocked, Active) VALUES ('".$_GET["c0"]."','".$_GET["c1"]."',".$_GET["c2"].",".$_GET["c3"].", ".$_GET["c4"].",".$_GET["c5"].")"; $res = mysql_query($sql); //set value to use in response $newId = mysql_insert_id(); return "insert"; } function update_row(){ $sql = "UPDATE tbl_user SET UserName = '".$_GET["c0"]."', Password = '".$_GET["c1"]."', UserLevelId = ".$_GET["c2"].", WerknemerId = ".$_GET["c3"].", Blocked = ".$_GET["c4"].", Active = ".$_GET["c5"]." WHERE UserId = ".$_GET["gr_id"]; $res = mysql_query($sql); return "update"; } function delete_row(){ $d_sql = "DELETE FROM tbl_user WHERE UserId=".$_GET["gr_id"]; $resDel = mysql_query($d_sql); return "delete"; } //include XML Header (as response will be in xml format) header("Content-type: text/xml"); //encoding may differ in your case echo('<?xml version="1.0" encoding="utf-8"?>');
$mode  = $_GET["!nativeeditor_status"]; //get request mode
$rowId = $_GET["gr_id"]; //id or row which was updated 
$newId = $_GET["gr_id"]; //will be used for insert operation

 
switch($mode){
	case "inserted":
		//row adding request
		$action = add_row();
	break;
	case "deleted":
		//row deleting request
		$action = delete_row();
	break;
	default:
		//row updating request
		$action = update_row();
	break;
}
//output update results
echo "<data>";
echo "<action type='".$action."' sid='".$rowId."' tid='".$newId."'/>";
echo "</data>";

?>

me too! :smiling_imp:
before the version 4.2 is ok !
why…?