设计窝高端网站建设与制作
觉得不错,赏一个

觉得不错,赏一个

简单php表单接收值

设计窝2017-08-15php 
     <html>
      <head></head>
      <body>
      <form method="Post" action="login.php">
      <table border="1px" bordercolor="#C0A1C1" align="center">
        <tr>
      <td colspan="2"   becolor="#704171"  align="center"  /><font color="#FFFFFF">ShopNC会员注册</font></td>
      </tr>
      
      <tr>
      <td width="160px">用户名:</td><td width="240px"><input type="text"  name="uname" size="20" /></td>
      </tr>
      
      <tr>
      <td>密码:</td>
      <td><input type-"password" name-"pwd" size="20" /></td>
      </tr>

     <tr>
    <td>性别:</td><td><input type="radio" name="sex" value="male" checked>男
    <input type="radio" name="sex" value="female">女</td>
      </tr>
      
      <tr>
     <td>兴趣爱好:</td>
      <td>
     <input type="checkbox" name="favourate[]" value="game">游戏
     <input type="checkbox" name="favourate[]" value="sport">运动
     <input type="checkbox" name="favourate[]" value="computer">计算机
     </td>
      </tr>
      
      
      <tr>
    <td>国家:</td>
    <td>
    <select name="country">
    <option value="">一请选择一</option>
    <option value="china">中国</option>
    <option value="usa">美国</option>
    <option value="japan">日本</option>
    </select></td>
      </tr>
      
      <tr>
       <td>个人筒介:</td><td><textarea rows="12" cols="50" name="info"></textarea></td>
      </tr>
      
      <tr>
      <td colspan="2"  bgcolor="#A07lA1" align="center">
      <input type="submit" value="确认提交"/>    <input type="reset" value="重置"/>
      </td>
      </tr>
      
      </table>
      </form>
      </body>
      </html>

logo.html

      <html>
      <head>
      </head>
      <body>
    <form method="post" action="login.php">
    <table border="lpx" bordercolor="#C0A1C1" align="center">
        <tr>
    <td colspan="2"   bgcolor="#704171" align="center" /><font color="#FFFFFF">ShopNC会员注册</font></td>
      </tr>
      
      <tr>
    <td width="160px">您的用户名是:</td><td width="240px"><?php echo $_POST["uname"];?></td>
      </tr>
      
      <tr>
    <td>您的密码是:</td><td><?php echo md5($_POST["pwd"]);?></td>
      </tr>
      
      
      <tr>
    <td>性别:</td><td><?php if($_POST["sex"]=="male"){echo "男";}else{echo "女";}?></td>
      </tr>
          
          
          <tr>
    <td> 兴趣爱好:</td>
    <td>
            <?php 
            if($_POST["favourate"]){
                foreach($_POST["favourate"] as $key=>$value)
                {echo $value."   ";}
                }
                ?></td>
      </tr>
      
      <tr>
    <td>国家:</td>
    <td>
            <?php 
            if($_POST["country"]=="china"){
                echo "中国";
                }else if($_POST["country"]=="usa"){echo"美国";}else{echo "日本";}
                ?></td>
      </tr>
      
      <tr>
    <td>个人简介:</td>
     <td><b><?php echo wordwrap($_POST["info"],25,"<br/>\n",true);?></b></td>
      </tr>
      </table>
      </form>
      </body>
      </html>

login.php

文章关键词
设计窝