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>
  • 相关阅读:
    About “condition variables”
    路由表的读法(zz)
    C++字符串之一(字符表示)
    Audio Codec Summary
    关于telnet
    C++ 之 new
    (转)让ubuntu9.10开机自动挂载NTFS分区
    WorkSpace And Static Library In GarbageXcode4
    mac os x 10.7下配置svn服务器
    ubuntu下设置双显示器扩展桌面
  • 原文地址:https://www.cnblogs.com/mumulailai/p/14912419.html
Copyright © 2011-2022 走看看