Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
393 views
in Technique[技术] by (71.8m points)

javascript - 使用PHP创建了难以在MySQL数据库中生成以表格形式显示的随机用户信息的问题(Difficulties in generating random user information in my MySQL database to appear in a form have created using PHP)

<?php
$database_name = "generate_user";
$conn = mysqli_connect("localhost", "root", "", $database_name);

$result = mysqli_query($conn, "SELECT * FROM generate_user");
$row = mysqli_fetch_array($result);

$i = 0;
while($row = mysqli_fetch_array($result))
{
    ?>
            <input id="name" name="name" type="text" required="required" class="form-control" value="<?php echo $row['Name']?>"><br><br>
            <input id="gender" name="gender" type="text" class="form-control" value="<?php echo $row['Gender']?>"><br><br>
            <input id="nationality" name="nationality" type="text" required="required" class="form-control" value="<?php echo $row['Nationality']?>"><br><br>
            <input id="age" name="age" type="text" required="required" class="form-control" value="<?php echo $row['Age']?>"><br><br>
            <a class="form" href="#"><img src="Images/user.png" width="100" height="100" style="position: relative; left: 40%;" value="<?php echo $row['Images']?>"></a>
    <?php

    $i++;
}

And wanted the details to show in the main form when the button is clicked and stay on the same page instead of showing the details in the next page.

(并希望在单击按钮时将细节显示在主窗体中并停留在同一页面上,而不是在下一页中显示细节。)

  ask by Michael Kwabena Okyere translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...