多个表单仅在第一个表单的操作上重定向

时间:2012-11-08 05:51:14

标签: php javascript html

我在单页bcz中使用了多个表单我必须在我的浏览器中没有启用javascript的情况下工作我的页面..但问题是所有表单都在单页上重定向..所有表单都转到第一个表单的动作..如果你可以改变第一种形式的动作,然后所有形式都转到那个链接...我知道有愚蠢的错误,但我没能弄清楚..plz帮助我...提前thnks ..

//html code

<div id="propertymenu">
        <table cellspacing="20">
            <tr>
                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="mainainancebills.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="PROPERTY DETAILS">
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="inspectionreport.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="INSPECTION REPORTS">
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="downloaddocument.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="DOWNLOAD DOCUMENTS">
                </font>
                </td>
            </tr>

            <tr>
                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="downloaddocument.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="STATEMENT OF ACCOUNT">
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="electricitybills.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="ELECTICITY BILLS">
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="downloaddocument.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="OTHERS">
                </font></td>
            </tr>

            <tr>
                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="expensestracker.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="DETAIL OF EXPENSES">
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="mainainancebills.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="MAINTENANCE BILLS">
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="ownerhome.php">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="submit" value="BACK">
                </form></td>
            </tr>
        </table>
    </div>

3 个答案:

答案 0 :(得分:1)

你有

</font> 

而不是

</form> 

在那里。

答案 1 :(得分:1)

这段代码有些不对劲。因为对于每一种形式都没有结束形式是wriiten意味着形式并不是每个形式的开始。 你的正确代码是

<div id="propertymenu">
        <table cellspacing="20">
            <tr>
                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="mainainancebills.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="PROPERTY DETAILS">
                </form>
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="inspectionreport.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="INSPECTION REPORTS">
                </form>
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="downloaddocument.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="DOWNLOAD DOCUMENTS">
                </form>
                </font>
                </td>
            </tr>

            <tr>
                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="downloaddocument.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="STATEMENT OF ACCOUNT">
                </form>
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="electricitybills.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="ELECTICITY BILLS">
                </form>
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="downloaddocument.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="OTHERS">
                </form>
                </font></td>
            </tr>

            <tr>
                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="expensestracker.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="DETAIL OF EXPENSES">
                </form>
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="mainainancebills.php">
                    <input type="hidden" value="<?PHP echo $buildname; ?>" name="bn">
                    <input type="hidden" value="<?PHP echo $flatno; ?>" name="fn">
                    <input type="hidden" value="<?PHP echo $area; ?>" name="area">
                    <input type="hidden" value="<?PHP echo $pincode; ?>" name="pc">
                    <input type="hidden" value="<?PHP echo $owner; ?>" name="owner">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="hidden" value="<?PHP echo $fullname; ?>" name="fname">
                    <input type="hidden" value="<?PHP echo $email; ?>" name="email">
                    <input type="submit" value="MAINTENANCE BILLS">
                </form>
                </font></td>

                <td style="background-color:#94EEF2;">
                <form method="post" class='propertylist' action="ownerhome.php">
                    <input type="hidden" value="<?PHP echo $property; ?>" name="pid">
                    <input type="submit" value="BACK">
                </form></td>
            </tr>
        </table>
    </div>

答案 2 :(得分:0)

请关闭1表1的表格

<form name="Your_firstform">

//Your code here

</form>


<form name="Your_secondform">

//Your code here

</form>

<form name="Your_thirdform">

//Your code here

</form>