Hi,
I’m stil have problems with server side returns (creating the right xml code).
Everything works fine and the database makes the rigth operation but I can’t get a correct response.
See server side code for example:
<?php
include("./configs/connect.cfg.php");
/**
* connect database
/
$opdDB = mysql_connect( DB_HOST, DB_USER, DB_PASS ) or die(mysql_error());
mysql_select_db( DB_NAME ) or die(mysql_error());
$id = explode( “_”, $_POST[‘gr_id’] );
$usrID = $id[0];
$Kundennr = $id[1];
$Warengruppe = $id[2];
$response = $_POST[‘gr_id’];
/
* Pr�fen, ob schon ein Eintrag vorhanden ist.
/
$query = "SELECT count() FROM potentials
WHERE usrID
= ‘".$usrID."’ AND
Kundennr
= ‘".$Kundennr."’ AND
Warengruppe
= ‘".$Warengruppe."’";
$result = mysql_query( $query ) or die(mysql_error());
$total = mysql_result( $result, 0 );
if ( $total ) {
// record available, change it
$query = “UPDATE potentials
SET Menge
= '”.$_POST[‘c1’]."’
WHERE
usrID
= ‘".$usrID."’ AND
Kundennr
= ‘".$Kundennr."’ AND
Warengruppe
= ‘".$Warengruppe."’";
$result = mysql_query( $query ) or die( mysql_error());
} else {
// no entry available, create a new one
$query = “INSERT INTO potentials
(
usrID
,Kundennr
,Warengruppe
,Menge
) VALUES (
'”.$usrID."’,
‘".$Kundennr."’,
‘".$Warengruppe."’,
‘".$_POST[‘c1’]."’
)";
$result = mysql_query( $query ) or die(mysql_error());
}
/**
* close database
/
mysql_close( $opdDB );
/*
* Send response
*/
print("");
?>
The answer from your dubug tool looks like
Server url: update.php?
gr_id=3_4060-01_FOB%20ERTR
c0=FOB%20ERTR
c1=5000
c2=0
server response received
Not a XML
What is wrong?
Many thanks for your help.
KK
You need to return the data as XML stream, try to add next line to your php file
header(“Content-type:text/xml”);
I’m so sory, but it does’nt work. Allways the same error message in debug mode.
Now it works fine.
By the way: Your tool is a perfect development environment for web apllications and I’m happy deciding me for your product.
But one additional question:
Do you plan a nationalisation of that tool. I’m working in different projects for different countries and so it would be great to have the opportunity to choose e.g. currency signs?
Kind regards
Klaus
The code of component is created in a way which must simplify customization for different settings.
The only hardcoded text lines stored by component ( except of debug messages ) are texts in paging mode, which can be configured separatly
dhtmlx.com/docs/products/dhtmlxG … ormatcells