Hello,
I have this query:
mysql_select_db ( $database_ggi, $ggi );
$query_rsUserName = sprintf ( "SELECT nome FROM utilizadores WHERE utilizador = '%s'", $_SESSION['MM_Username'] );
$rsUserName = mysql_query ( $query_rsUserName, $ggi ) or die ( mysql_error () );
$row_rsUserName = mysql_fetch_assoc ( $rsUserName );
$totalRows_rsUserName = mysql_num_rows ( $rsUserName );
and I would like to autosave the username on the table, something like this:
$col = array();
$col["title"] = "Utilizador";
$col["name"] = "Utilizador";
$col["width"] = "0";
$col["align"] = "left";
$col["hidden"] = false;
$col["editable"] = true; // esta coluna não editável
$col["editoptions"] = array("size"=>20); // with default display of textbox with size 20
// $col["editrules"] = array("required"=>false); // required:true(false), number:true(false), minValue:val, maxValue:val
// $col["editrules"] = array("edithidden"=>true);
// $col["formatter"] = "date"; // format as date
$col["formatter"] = "autocomplete"; // autocomplete
$col["formatoptions"] = $rsUserName;
$cols[] = $col;
But this is not working, can you help me.
Thanks
Jorge Barosa
Hello Abu,
Thanks for your answer.
I want this field to be saved, but I don't want the user to edit the field!
$col = array();
$col["title"] = "Utilizador";
$col["name"] = "Utilizador";
$col["width"] = "20";
$col["align"] = "left";
$col["hidden"] = false;
$col["editable"] = false; // esta coluna não editável
// $col["editoptions"] = array("size"=>20); // with default display of textbox with size 20
$col["editoptions"]["defaultValue"] = $nome;
$cols[] = $col;
How can I do it?
Regards,
Jorge Barosa