I need a select / select selecting the name, bring me the NIT of my BD?

0

This code is only showing me the name of the clients of my database but I need that when selecting it I also bring the NIT

<?php  
    $conexion =  mysqli_connect("localhost", "root","admin123","database");

     $sentencia = "SELECT * FROM cliente  ";
     $query = mysqli_query($conexion,$sentencia);
?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Editar Cliente</title>
    <link rel="stylesheet" type="text/css" href="estilos.css">
</head>
<body>      
    <center>
        <table width="280" cellspacing="1" cellpadding="3" border="0" bgcolor="#1E679A">
        <h1>Editar Cliente</h1>

        <form action="editarCliente_submit" method="get" accept-charset="utf-8">

        </form>


        <br> <label>Nombre Del Cliente : </label>
        <select name="Clientes">

            <?php while ($arreglo = mysqli_fetch_array($query)) { ?>

            <option value="<?php echo $arreglo['NIT']?>"><?php echo $arreglo ['nombre_Cliente']?></option>

            <?php } ?>

            option
        </select></br>

        <br> <label>NIT : </label>
        <input type="text" name="user" placeholder=" " required size="30" maxlength="30" style="margin-left: 8%" /><br/>

        <br> <label style="margin-left: -10%"> ¿Se realizan RIPS?  </label>
        <input type="text" name="user" placeholder="" required size="10" maxlength="15" style="margin-left: 3%" /><br/>

        <br><input type="submit" name="Modificar_Cliente" value ="Modificar" onclick="location='http://localhost/Aeroasistencia/Administracion/modificarCliente.php'" style="margin-right: 3%">

        <input type="submit" name="Nuevo_Cliente" value ="Nuevo" onclick="location='http://localhost/Aeroasistencia/Administracion/nuevoCliente.php'">

        <input type="submit" name="Eliminar_Cliente" value ="Eliminar" onclick="location='http://localhost/Aeroasistencia/Administracion/eliminarCliente.php'" style="margin-left: 3%"> 

        <input type="submit" value="Volver" onclick="location='http://localhost/Aeroasistencia/Administracion/administracion.php'" style="margin-left: 3%" />


        </table>
    </center>

</body>
</html>
    
asked by Cristian Antonio Trujillo Gris 23.03.2018 в 21:41
source

0 answers