Good I need to insert data of a record of a user in 2 different ablas, the id in the table users is the primary key and in the table owners is the FK but when doing the query it does not record them register in the users table but not in the owners, I hope you can help me in the '' who are alone is because in the tables I have the autoincrementable id
<?php
session_start();
require_once('./../../conexion.php');
// recuperamos los datos del formulario
$nombre = $_POST['nombre'];
$apellido = $_POST['apellido'];
$correo = ($_POST['correo']);
$clave =sha1(md5(123456));
$apartamento = $_POST['apartamento'];
$alicuota= $_POST['alicuota'];
$estado='Al dia';
// echo $nombre . "<br>";
// echo $apellido . "<br>";
// echo $correo . "<br>";
// echo $clave . "<br>";
// echo $apartamento . "<br>";
// echo $alicuota ;
$consulta = "INSERT INTO usuarios VALUES('','$nombre','$apellido','$correo','$clave','$apartamento', '2',
'$alicuota' )";
$query = mysqli_query($conexion, $consulta);
$consulta2 = "INSERT INTO propietarios VALUES('','$nombre','$apellido','$apartamento','$estado' )";
$query2 = mysqli_query($conexion, $consulta2);
if ($query2) {
?>
<meta http-equiv="refresh" content="0;URL=./../index1.php">
<?php
}
#header('Location: condominio.php');
?>