• JAVA日报


    php(ex02c.php)

    <?php
    if(isset($_GET['name'])&&isset($_GET['sex'])){
    $ID = $_GET['name'];
    $sex = $_GET['sex'];
    $conn=mysqli_connect("localhost","root","123","text3") or die("数据库连接失败");
    mysqli_query($conn,'set names utf8');

    $sql3="select * from student where id='$ID' and sex='$sex'";
    $result=mysqli_query($conn,$sql3)or die("数据查询失败");


    $conn->close();
    }

    ?>
    <div style="position: absolute;height: 60%; 70%;left: 20%;top: 15%">
    <form action="ex02b.php" method="post">
    <table border="1" style="height: 100%; 100%">
    <tr>
    <td style="text-align: center" colspan="3">
    个人信息
    </td>

    </tr>
    <tr>
    <td>您的姓名:</td>
    <td colspan="2"><?php foreach ($result as $value){echo $value['id'];break;}?></td>
    </tr>
    <tr>
    <td>性别:</td>
    <td><?php foreach ($result as $value){echo $value['sex'];break;}?></td>
    </tr>
    <tr>
    <td>家庭住址:</td>
    <td colspan="2">
    <input name="area" type="text" value="<?php foreach ($result as $value){echo $value['area'];break;}?>">
    </td>
    </tr>
    <tr>
    <td>
    特长爱好:
    </td>
    <td colspan="2">
    <input name="hobby" type="text" value="<?php foreach ($result as $value){echo $value['hobby'];break;}?>">
    </td>
    </tr>
    <tr>
    <td colspan="3" style="text-align: center">
    <a href="ex02a.php">返回首页</a>
    </td>
    </tr>
    </table>
    </form>
    </div>
  • 相关阅读:
    jython 访问数据库的方法
    Server 2008安装FTP的简单教程
    如何实现Android重启应用程序代码 ?
    android 应用程序自适应屏幕大小
    Android Dialog用法
    2008Server错误
    7种形式的Android Dialog使用举例
    ADB使用方法
    调用手机震动
    android小记之FTP文件上传
  • 原文地址:https://www.cnblogs.com/mumulailai/p/14912419.html
Copyright © 2020-2023  润新知