Update another table
Update another table
Allan
I need to update table "B" when table "A" is edited so, with your enormous help I did
if ( isset( $_POST['action'] ) && $_POST['action'] === 'edit' ) {
// Actualizo la nota
$res1 = $db->sql( "
UPDATE notas
SET fecha = '".$_POST['data']['fecha']."',
idproyecto = '".$_POST['data']['idproyecto']."',
usuario = '".$_SESSION['nombre_staff'] ."',
idcontacto = '".$_POST['data']['idcontacto']."'
WHERE id = ".$_POST['data']['idnota'].";
")
->fetch();
}
But seem that $_POST $_POST['data']['idproyecto'] and the other Posts are empty...Any advice?
I need to update table "B" when table "A" is edited so, with your enormous help I did
if ( isset( $_POST['action'] ) && $_POST['action'] === 'edit' ) {
// Actualizo la nota
$res1 = $db->sql( "
UPDATE notas
SET fecha = '".$_POST['data']['fecha']."',
idproyecto = '".$_POST['data']['idproyecto']."',
usuario = '".$_SESSION['nombre_staff'] ."',
idcontacto = '".$_POST['data']['idcontacto']."'
WHERE id = ".$_POST['data']['idnota'].";
")
->fetch();
}
But seem that $_POST $_POST['data']['idproyecto'] and the other Posts are empty...Any advice?
This discussion has been closed.
Replies
Allan
Regards,
Allan