2012-01-02 69 views
0

我目前正在使用Dreamveaver CS4登錄頁面。

我的形式看起來像這樣(我一直在代碼完成):

<form id="login" name="login" method="POST" action="<?php echo $loginFormAction; ?>" 
enctype="multipart/form-data"> 
    <input type="hidden" name="loginnow" id="loginnow" value="go"> 
    <table border="0" cellpadding="5" cellspacing="0"> 
     <tr> 
     <td rowspan="4"><img src="images/icons/login_icon.jpg" width="240" height="218" alt="login-icon"></td> 
     <td>Benutzername</td> 
     <td><input name="usern" type="text" class="fieldSm" id="usern"></td> 
     </tr> 
     <tr> 
     <td>Passwort</td> 
     <td><input name="passwrd" type="password" class="fieldSm" id="passwrd"></td> 
     </tr> 
     <tr> 
     <td colspan="2" align="center"><input name="submit" type="submit" class="button" id="submit" value="Anmelden"></td> 
     </tr> 
    <tr> 
     <td colspan="2"><a href="accounts/register.php">Hier </a>k&ouml;nnen Sie sich registrieren</td> 
     </tr> 
    </table> 
</form> 

現在PHP腳本檢查隱藏字段

<?php if (isset($_POST['loginnow'])) { 
    # do some DW magic ;) 
    } 
?> 

與Firefox它工作得很好,我可以登錄正確的,但是與IE8失敗。

所以,我與檢查:

<pre> 
    <?php print_r($_POST); ?> 
</pre> 

此使用IE8時導致空數組。 $_REQUEST只有PHPSESSID。

我搜索了幾個網站,沒有結果或提示(主要是圖形提交按鈕的問題)。

如果有人可以給我一個提示,我的錯誤是什麼,我將非常感激。

+2

你有沒有檢查,如果[that](http://stackoverflow.com/questions/5385341/post-variables-coming-through-empty-in-ie7-for-one-subfolder)或[that](http: //stackoverflow.com/questions/4409847/posting-from-ie8-to-php-gives-blank-post)是你在找什麼? – fab 2012-01-02 12:42:05

+0

'action =「post」'應該小寫。這可能不會導致問題,但'action =「POST」'仍然不正確。 – 2012-01-02 12:42:24

+0

lowercased'action =「post」'不能解決問題,對不起 – Daniel 2012-01-02 12:51:52

回答

0

所有的頁面都帶有後綴php?你使用一個mamp/wamp或真正的網絡服務器與PHP?

+0

我正在使用QNAP SS-349Pro作爲網絡服務器與MySQL,它位於防火牆後面的同一網絡中。所有fildes使用.php後綴。 – Daniel 2012-01-02 13:40:57

+0

嘗試關閉您的輸入;-) clement 2012-01-02 13:44:08

+0

@Daniel:怎麼了? – clement 2012-01-09 10:22:10