doukezi4576 2013-01-03 20:42
浏览 28
已采纳

html提交按钮

i have this code

  1. file search.php


<html>
<head>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>


<script>


</script>
<?php
if(isset($_POST['bt_submit'])){
header('Location: accueil.php?region='); 
}


?>

<style>
body {
background-image: url(../images/paper_03.png);
}
form {
background-image: url(../images/paper_02.png);
}
</style>
</head>


<body>
<form name="search" method="post"   >
                          <form name="map" style="position: relative; top:10px; left:300px; width: 400px; height: 130px;">
jjjjjjjjjjjjjjjjj
                           </form>
                           <form name="advanced" style="position: relative; top:10px; left:300px; width: 400px; height: 130px;" action="blabla.php">
                                                     <form name="location" style="position: relative; top:10px; left:300px; width: 300px; height: 90px;">
                                                                          <div style="background-color:99FFFF"><font color="blue">Location</font></div>
                                                                          <table>
                                                                                   <tr>
                                                                                        <td>Region:   </td><td  ><select style="width:200px" name="region"> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                </select>  </td>
                                                                                   </tr>
                                                                                   <tr>
                                                                                        <td>City:   </td><td colspan="3"><input type="text" style="width:200px" name="city" />   </td>
                                                                                   </tr>
                                                                                   <tr>
                                                                                        <td>State/Province:   </td><td colspan="3"><select style="width:200px"> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                </select>  </td>
                                                                                   </tr>
                                                                                   <tr>
                                                                                         <td>Country:   </td><td colspan="3"><select style="width:200px" > 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                </select>  </td>
                                                                                   </tr>


                                                                          </table>
                                                       </form>





                                                     <form name="keywords" style="position: relative; top:10px; left:300px; width: 400px; height: 50px;" >
                                                                           <div style="background-color:99FFFF"><font color="blue">Keywords</font></div>
                                                                            <table>
                                                                                   <tr>
                                                                                        <td colspan="2">Keywords:    </td><td ><input type="text" style="width:225px" name="keywords"  />   </td>
                                                                                   </tr>
                                                                            </table>       
                                                      </form>



                                                      <form name="company" style="position: relative; top:10px; left:300px; width: 400px; height: 50px;" >
                                                                            <div style="background-color:99FFFF"><font color="blue">Company</font></div>
                                                                            <table>
                                                                                    <tr>
                                                                                        <td>Company:   </td><td colspan="3"><select style="width:230px"> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                </select>  </td>
                                                                                   </tr>
                                                                            </table>
                                                       </form>



                                                       <form name="job_category"  style="position: relative; top:10px; left:300px; width: 400px; height: 50px;">
                                                                            <div style="background-color:99FFFF"><font color="blue">Job category</font></div>
                                                                            <table>
                                                                                    <tr>
                                                                                        <td>Job category:   </td><td colspan="3"><select style="width:210px"> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                </select>  </td>
                                                                                   </tr>
                                                                            </table>
                                                       </form>



                                                       <form name="dates"  style="position: relative; top:10px; left:300px; width: 400px; height: 50px;">
                                                                            <div style="background-color:99FFFF"><font color="blue">Dates</font></div>
                                                                            <table>
                                                                                    <tr>
                                                                                        <td>Date range:   </td><td colspan="3"><select style="width:225px"> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                <option value="1">truc</option> 
                                                                                                                </select>  </td>
                                                                                   </tr>
                                                                            </table>      
                                                        </form>






                           </form>
                            <input type="submit"  name="bt_submit"  value="Search Now" style="position: relative;  left:400px; width: 100px" />


</form>
</body>
</html>

this file contains php and html code .the interface contains two sections : the first is a form and the second is a set of forms that must be submitted by the button my problem is when i click in button of submit to validate the form the redirection didn't work and nothing is done. so i need know

  1. why?
  2. how can i fix this error?
  • 写回答

3条回答 默认 最新

  • douxianglu4370 2013-01-03 20:46
    关注

    You only need one <form>. You might want to use <fieldset> elements to group sections of the form together, but by having multiple forms they are treated completely separately.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作