Hello,
I have a serious problem with the use of dhtmlxform and recording data from the form in my database.
in fact this is my form in client side:
function formanneeOnLoad()
{
var formData =
[
{
type: "fieldset", name: "mydata", label: "Espace année budgétaire", width:610,
list:
[
{
type: "fieldset",
label: "Création d'une année budgétaire",
inputWidth: 550,
list:
[
{
type: "input",
label: "année budgétaire:",
name: "nom",
validate: "NotEmpty"
},
{
type: "hidden",
name: "iscurrent",
value: "false"
},
{
type: "hidden",
name: "islocked",
value: "false"
},
{
type: "calendar",
dateFormat:"%Y-%m-%d",
name: "debut",
label: "Début",
validate: "NotEmpty",
calendarPosition: "bottom"
},
{
type: "calendar",
dateFormat: "%Y-%m-%d",
name: "fin",
label: "Fin",
validate: "NotEmpty",
calendarPosition: "bottom"
},
{
type: "button",
value: "Enregistrer",
name: "enregistrer"
}
]
}
]
}
];
formannee = new dhtmlXForm("formannee", formData);
var dp = new dataProcessor("controleurs/annee.php");
dp.init(formannee);
formannee.enableLiveValidation(true);
formannee.attachEvent("onButtonClick", function()
{
formannee.validate();
});
formannee.attachEvent("onButtonClick", function(id)
{
this.send("controleurs/annee.php");
}
);
}
<div id="myForm" style="height:30px; float:right;"></div>
my connector on server side:
<?php
try {
require_once("../vues/codebase/form_connector.php");
require("../vues/codebase/db_pdo.php");
$conn=new PDO('pgsql:host=localhost port=5436 dbname=mission', 'postgres', 'fb12fb12b');
$form = new FormConnector($conn);
$form->render_table("annee","id","id,nom,iscurrent,islocked,debut,fin");
}
catch (PDOException $e)
{
print "Erreur !: " . $e->getMessage() . "<br/>";
die();
}
?>
and i have the following erros:
in server side
[13-Feb-2013 07:34:38] PHP Notice: Undefined index: ids in H:\Program Files\Zend\Apache2\htdocs\Ordre de Mission\vues\codebase\form_connector.php on line 56
[13-Feb-2013 07:34:38] PHP Fatal error: Uncaught exception 'Exception' with message 'ID parameter is missed' in H:\Program Files\Zend\Apache2\htdocs\Ordre de Mission\vues\codebase\form_connector.php:57
Stack trace:
#0 H:\Program Files\Zend\Apache2\htdocs\Ordre de Mission\vues\codebase\base_connector.php(467): FormConnector->parse_request()
#1 H:\Program Files\Zend\Apache2\htdocs\Ordre de Mission\vues\codebase\base_connector.php(398): Connector->render()
#2 H:\Program Files\Zend\Apache2\htdocs\Ordre de Mission\controleurs\annee.php(14): Connector->render_table('annee', 'id', 'id,nom,iscurren...')
#3 {main}
thrown in H:\Program Files\Zend\Apache2\htdocs\Ordre de Mission\vues\codebase\form_connector.php on line 57
in client side
"NetworkError: 500 Internal Server Error - http://localhost/Ordre%20de%20Mission/controleurs/annee.php"
can someone give some of his precious time to help me