I have the teaching table with the field usuario_idusuario
, which is related to the user table in the field idusuario
and I need to modify the teaching table and the fields of the user table that belong to the idusuario
related to the table of teacher
//campos de la tabla docente
$id = $_POST['ID'];
$nombre = $_POST['Nombre'];
$telefono = $_POST['Telefono'];
$email = $_POST['Email'];
$direccion = $_POST['Direccion'];
$usuario = $_POST['Usuario'];
$contraseña = $_POST['Contraseña'];
$sql = "UPDATE docente SET iddocente='$id', nombreDocente='$nombre', telefonoDocente='$telefono', emailDocente='$email', direccionDocente='$direccion', INNER JOIN usuario ON usuario_idusuario=usuario, usuario_idusuario='$usuario' contrasena='$contraseña' WHERE iddocente = '$id'";
mysqli_query($con, $sql);
the user table contains the fields
-idusuario <-- campo relacionado a la tabla docente usuario_idusuario
-usuario
-contrasena