我在頁面上有兩種形式 - 「索引頁面加上包含的頁面」。他們的行爲就像是行動=''一樣。問題是,當我點擊搜索欄上的提交時,它顯示標題錯誤。提交的登錄工作正常。我一直縮小到兩種形式在提交時互相干擾
tabindex="6" type="submit"
在登錄表單的提交按鈕。
它們都有不同的名稱。
登錄表單:
echo'<div id="container">
<div id="topnav" class="topnav"> <font color="white">Have an account?  </font> <a href="login" class="signin"><span>Sign in</span></a><a href="/*********/register" class="signin3"><span>Sign Up</span></a> </div>
<fieldset id="signin_menu">';
output_errors($errors);
echo'
<form id="signin" action="" method="POST" >
<br>
<label for="username"><font color="black">Username or email</font></label>
<input id="username" name="username" value="" title="username" tabindex="4" type="text">
</p>
<p>
<label for="password"><font color="black">Password</font></label>
<input id="password" name="password" value="" title="password" tabindex="5" type="password">
</p>
<p class="remember">
<input id="signin_submit" name="submit" value="Sign in" tabindex="6" type="submit">
<input id="remember" name="remember_me" value="1" tabindex="7" type="checkbox">
<label for="remember"><font color="black">Remember me</font></label>
</p>
<p class="forgot"> <a href="/*********/recovery/password" id="resend_password_link">Forgot your password?</a> </p>
<p class="forgot-username"> <A id=forgot_username_link
title="If you remember your password, try logging in with your email"
href="/recovery/username">Forgot your username?</A> </p>
</form>
</fieldset>
</div>';
搜索表單:
<form action='' method='POST'>
<input type='text' value='". $clean ."' name='keywords'/>
<input type='submit' name='submit2' Value='Search'/>
</form>
頭錯誤:
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files (x86)\xampp\htdocs***\index.php:298) in C:\Program Files (x86)\xampp\htdocs***\pages\search.inc.php on line 35
如果我登錄並且表單消失,它可以正常工作,但是如果表單不存在,並且它由兩個屬性tabindex =「6」type =「submit」引起。如果我拿出這些搜索提交作品,但登錄表單按鈕不再起作用。 – user2067005 2013-02-18 02:34:33