3.2.0

problem with setParameter

Hello;
the first sorry for my english, is very bad, i'm from spain.
In my program exist this onclick event

listar.onClick = function(){
var myHeaders = <?= aw_headers1($dataset1) ?>
var myCells = <?= aw_cells1($dataset1) ?>
datos.setHeaderText(myHeaders);
datos.setCellText(myCells);
datos.setColumnCount(myHeaders.length);
datos.setRowCount(myCells.length);
datos.setCellEditable(true);
datos.onCellValidated = function(text, column, row, id, db){
var r = new AW.HTTP.Request;
var primero = myCells[row].shift();
r.setURL('actualizar.php');
r.setRequestMethod('POST');
r.setParameter('column', myHeaders[column]);
r.setParameter('id', primero);
r.setParameter('row', row);
r.setParameter('text', text);
r.setParameter('db', 'presupuestos');
r.request();
r.response = function(data){
alert(data);
}
}

and in my php program this

include("config.php");
$column = $HTTP_POST_VARS['column'];
$row = $HTTP_POST_VARS['row'];
$text = $HTTP_POST_VARS['text'];
$id = $HTTP_POST_VARS['id'];
$db = $HTTP_POST_VARS['db'];


$connection=mysql_connect("$server", "$db_user", "$db_pass");
$db=mysql_select_db("$database", $connection);
$query="UPDATE $db SET $column='$text' WHERE idpresupuesto='$id'";
$result=mysql_query($query);

echo "$db";

well, the variable retun in alert(data) is $db, in the event define value for this variable "setParameter('db', 'presupuestos');" and return 1 in the alert. why????
Carlos
March 6,
Many thanks for all, i solved the problem.
Carlos
March 7,

This topic is archived.

See also:


Back to support forum