浏览器差异

时间:2014-04-10 07:10:23

标签: php html browser submit contactus

当我试图用safari测试它时,即它没有显示任何结果:(而是一个空页面加载。,同样也与我的联系表格。,

<html  lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
         <body>
         <div id="content"><br/>
                Fill out your criteria for searching and see the result below<br/><br/>

          <?php

        include('connection.php');

        $result = mysql_query("SELECT * FROM mytable") or die (mysql_error());

            if(isset($_POST['btnSearch']))
                {
                $query = $_POST['budget'];
                $query1 = $_POST['location'];
                //$query2 = $_POST['bedroom'];
                $query3 = $_POST['building'];

                {
                    if (isset($_POST['1br'])&&
                        $_POST['1br']=='1BR'){
                            $query2=$_POST['1br'];
                                }
                }

                 {
                    if (isset($_POST['2br'])&&
                        $_POST['2br']=='2BR'){
                            $query2=$_POST['2br'];
                                }
                }

                 {
                    if (isset($_POST['3br'])&&
                        $_POST['3br']=='3BR'){
                            $query2=$_POST['3br'];
                                }
                }

                $min_length = 0;
                if(strlen($query) >= $min_length)
                { 
                $query = htmlspecialchars($query); mysql_real_escape_string($query);
                $row_result = mysql_query("SELECT * FROM table WHERE(`location` like'%".$query1."%') && (`sale_price` like '%".$query."%') && (`numberoftb` like '%".$query2."%') && (`building_name` like '%".$query3."%')");
                if(mysql_num_rows($row_result) > 0)
                {
                while($result = mysql_fetch_array($row_result))
                { 

                echo'<span class="sub_header">TRANSACTION NUMBER:</span> '.$result['transaction_number'];
                echo'<span class="sub_header"><br/>LOCATION:</span> '.$result['location'];
                echo'<span class="sub_header"><br/>FOR LEASE:</span> '.$result['for_lease'];
                echo'<span class="sub_header"><br/>FOR SALE:</span> '.$result['for_sale'];
                echo'<span class="sub_header"><br/>BUILDING NAME:</span> '.$result['building_name'];
                echo'<span class="sub_header"><br/>DEVELOPER:</span> '.$result['developer'];
                echo'<span class="sub_header"><br/>NUMBER OF BEDROOM:</span> '.$result['numberoftb'];
                echo'<span class="sub_header"><br/>NUMBER OF ROOM:</span> '.$result['numberofroom'];
                echo'<span class="sub_header"><br/>FULLY FURNISHED:</span> '.$result['fullyfurnished'];
                echo'<span class="sub_header"><br/>WITH BALCONY:</span> '.$result['withbalcony'];
                echo'<span class="sub_header"><br/>SALE PRICE:</span> '.$result['sale_price'];
                echo'<span class="sub_header"><br/>LEASE PRICE:</span> '.$result['lease_price'];
                echo'<span class="sub_header"><br/>DESCRIPTION:</span> '.$result['description'];
                echo'<span class="sub_header"><br/>FLOOR AREA:</span> '.$result['floor_area'];
                echo'<span class="sub_header"><br/>MORE DETAILS:</span><a href="view.php?transaction_number='.$result['transaction_number'].'">View</a></td>';
                echo'<br/><br/>';
                }}
                else{ 
                echo'<span class="header">No Result</span>'; 
                } }
                else{ 
                echo "Minimum length is ".$min_length;
                }
              }      

        ?>

        </div>
            <div id="sidebar">
                <section class="widget">
                    <center><h4 class="widgettitle"><br/>Search!</h4><br/>
                    <form name="searchcondo" method="post" action="" >
                        <span class="sub_header">Enter the BUDGET you want:</span><br /><input type="text" name="budget" maxlength="50" size="30"><br/>
                        <span class="sub_header">Building Name:</span><br /><input type="text" name="building" maxlength="80" size="30"><br/>
                        <span class="sub_header">Number of BEDROOMS:</span><br /><input type="checkbox" name="1br" value="1BR">1BR<input type="checkbox" name="2br" value="2BR">2BR<input type="checkbox" name="3br" value="3BR">3BR<br/>
                        <span class="sub_header">Location:</span><br /><input type="text" name="location" maxlength="80" size="30"><br/>
                                    <br /><input type="submit" name="btnSearch" value="Search">
                    </form>
                    </center>
                </section>
    </body>
</html>

我已将其上传,上述代码适用于FireFox和Google Chrome。 什么是Safari和IE的可能解决方案? 我是新来的请帮帮我..谢谢.. :(

1 个答案:

答案 0 :(得分:0)

尝试在<div id="sidebar">

之后关闭</section>