zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    客户端本地存储,web存储,localStorage
    js地理定位对象 navigator.geolocation
    使用defined和require引入js
    VUE的使用方法
    $.each()的用法
    jQuery的deferred对象详解
    jquery 中prop()的使用方法
    IE7下对某些seajs压缩文件不兼容的解决方法
    饼状图注释
    $.grep()的用法
  • 原文地址:https://www.cnblogs.com/mumulailai/p/14912419.html
Copyright © 2011-2022 走看看