Page 1.- html with a dhtmlxGrid component that reads info from a table. Works great. I have 2 buttons here. I select a recod of my grid and push the botton this send me to page 2 were i can modify the record.
Page 2.- html with a dhtmlForm i see my record here, i can change the info, save my info and go back to page 1. The info is modified in my grid and my db.
Page 1.- i see my new info but if i try to modified again the same record when i go to page 2, there is a ploblem because the info that i see is not the new info, is like there was no change in my info.
<?php if ($opcion == 0) echo 'Modificación'; else echo 'Alta';?> a Usuarios
Clave:
>
Nombre:
Email:
Activo:
Si
No
<script>
var myForm = new dhtmlXForm("my_form");
var dp = new dataProcessor("conexion_form.php");
dp.init(myForm);
var mUrl = "<?php echo $id_usuario ?>";
var mOpcion = "<?php echo $opcion ?>";
if (mOpcion == 0) {
myForm.load(mUrl);
document.getElementsByName("nombre").item(0).focus(); // da el focus al elemento
}
else {
document.getElementsByName("clave").item(0).focus();
}
</script>
when i save the form the data is ok, this is my connection file: