Popular form with bank data [closed]

2

I need to populate a form when the page loads, I tried to search with php and store in an array and other forms (some are commented), but it does not show any errors, only no information appears. How I am doing:

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

    <!-- jQuery library -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><!--LatestcompiledJavaScript--><scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <style>
        .container{
            max-width:600px;
            width:100%;
        }
        body{
            background:#ecf0f1;
        }
    </style>
    <?php
    require 'db.php';
    $iduser = $_POST['iduser'];
    $result = mysqli_query($conn,"SELECT * FROM tb_usuarios WHERE user_id='$iduser'");
    $row = mysqli_fetch_array($result);
    /*global $result_array;
    //$result_array = array();
    while($row = mysqli_fetch_assoc($result))
    {
        $result_array['user_nome'] = $row['user_nome'];
        $result_array['user_email'] = $row['user_email'];
        $result_array['user_end_rua'] = $row['user_end_rua'];
        $result_array['user_end_bairro'] = $row['user_end_bairro'];
        $result_array['user_end_numero'] = $row['user_end_numero'];
        $result_array['user_tel'] = $row['user_tel'];
        $result_array['user_cpf'] = $row['user_cpf'];

    }*/
    //$row = mysqli_fetch_array($result);
    //echo  $result_array['1'];
    ?>
    <title>Alterar Dados</title>
</head>
<body>
<div class="container" align="center">
    <img src="image/logo.fw.png" style="margin-top:25px;margin-bottom:25px" width="150" height="59" alt="logo">
    <div class="panel panel-default">
        <div class="panel-heading">Atualize seus dados</div>
        <div class="panel-body">
            <form action="php/cadastro.php" method="post">
                <div name="login">
                    <div class="input-group">
                        <span class="input-group-addon">Nome</span>
                        <input id="nome" type="text" class="form-control" name="user_nome" value="<?php echo $row['user_nome']; ?>" disabled>
                    </div>
                    <div class="input-group">
                        <span class="input-group-addon">Email</span>
                        <input id="email" type="email" class="form-control" name="user_email"  value="<?php $row['user_email']; ?>" required >

                    <input type="hidden" name="user_nivel" value="0">

                    <div style="margin-top:12px">
                        <input type="reset" class="btn btn-warning pull-left" value="Limpar"/>
                        <input type="submit" class="btn btn-success pull-right"
                               style="padding-left:25px;padding-right:25px;" value="Cadastrar"/>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
    
asked by anonymous 01.11.2017 / 23:10

0 answers