I have a form that has the data of an account and a foreign pk: identification, then I send them to another page to make the insert but the variables do not arrive, isset tells me they are not defined
if(isset($_GET['identificacion'])){
$identificacion = $_GET['identificacion'];
echo "<div align='center'>";
echo "<form action='cuenta_ingresada.php' method='post'>";
echo "<label for='identificacion'>Identificacion </label> ";
echo "<input type='text' name='identificacion' disabled value='". $identificacion . "'><br>";
echo "<label for='nro_cuenta'>Número de Cuenta </label> ";
echo "<input type='text' name='nro_cuenta' ><br>";
echo "<label for='fecha_apertura'>Fecha de Apertura </label> ";
echo "<input type='text' name='fecha_apertura' ><br>";
echo "<label for='sucursal_ciudad'>Sucursal Ciudad </label> ";
echo "<input type='text' name='sucursal_ciudad' ><br>";
echo "<label for='tipo'>Tipo </label> ";
echo "<input type='text' name='tipo' ><br>";
echo "<label for='saldo'>Saldo </label> ";
echo "<input type='text' name='saldo' ><br>";
echo "<div class='button'>";
echo "<button type='submit' name='submit' value='actualizar'>Actualizar</button>";
//<button type="submit" name="submit">Guardar</button>
echo "</div>";
echo "</form>";
echo "</div>";
And here they come
if(isset($_POST['identificacion']) &&
isset($_POST['nro_cuenta']) &&
isset($_POST['fecha_apertura']) &&
isset($_POST['sucursal_ciudad']) &&
isset($_POST['tipo']) &&
isset($_POST['saldo']))
{
$nro_cuenta = $_POST['nro_cuenta'];
$fecha_apertura = $_POST['fecha_apertura'];
$sucursal_ciudad = $_POST['sucursal_ciudad'];
$tipo = $_POST['tipo'];
$saldo = $_POST['saldo'];
$identificacion = $_POST['identificacion'];
$insertar = "INSERT INTO tbl_cuentas (nro_cuenta, fecha_apertura, sucursal_ciudad, tipo, saldo, identificacion) VALUES ('$nro_cuenta', '$fecha_apertura', '$sucursal_ciudad', '$tipo', '$saldo', '$identificacion')";