2012-10-18 31 views
0

您好,我嘗試通過在網站上創建一個類似的表單來登錄(http://1betvegas.com/default.aspx)來鏈接帳戶。我正在創建一個界面,您可以在無需上網的情況下鏈接您的帳戶,並且您可以通過界面進行投注和所有操作。在php中連接帳戶時遇到的問題

我的問題是,當我發送數據時,它沒有登錄,我認爲它可能與表單部分中的onkeypress()有關,但不能確定。

代碼:

<form name='aspnetForm' method='post' action='http://1betvegas.com/default.aspx' onkeypress='javascript:return WebForm_FireDefaultButton(event, 'ctl00_MainContent_ctlLogin_BtnSubmit')' id='aspnetForm' style='margin: 0 0 0 0;'> 
    <table> 
     <tr> 
      <td> 
      username: 
      </td> 
      <td> 
       <input name='ctl00$MainContent$ctlLogin$_UserName' type='text' size='15' id='ctl00_MainContent_ctlLogin__UserName' accesskey='u' tabindex='60' class='login_input'> 
      </td> 
     </tr> 
     <tr> 
      <td> 
      password: 
      </td> 

      <td> 
      <input name='ctl00$MainContent$ctlLogin$_IdBook' type='hidden' id='ctl00_MainContent_ctlLogin__IdBook'> 
      <input name='ctl00$MainContent$ctlLogin$Redir' type='hidden' id='ctl00_MainContent_ctlLogin_Redir' value='wager/welcome.aspx'> 
       <input name='ctl00$MainContent$ctlLogin$_Password' type='password' size='15' id='ctl00_MainContent_ctlLogin__Password' accesskey='p' tabindex='61' class='login_input'> 
      </td> 
     </tr> 
     <tr> 
     <input type='submit' name='ctl00$MainContent$ctlLogin$BtnSubmit' value='Login' id='ctl00_MainContent_ctlLogin_BtnSubmit' class='login_input' style='text-transform: uppercase;'> 
     </tr> 
    </table> 
</form> 

此代碼----所有的輸入框和形式與實際站點。

+0

所以你在後端使用php.NET嗎?並且在這個問題中onpress在哪裏 – Ibu

+0

它在onkeypress()在

回答

0

你有

onkeypress='javascript:return WebForm_FireDefaultButton(event, 'ctl00_MainContent_ctlLogin_BtnSubmit')' 

改變其錯誤

onkeypress='javascript:return WebForm_FireDefaultButton(event, "ctl00_MainContent_ctlLogin_BtnSubmit")' 

注意引號,也這是不是php,這是asp.net

+0

它給了我一個錯誤,當我使用你告訴我改變的那個 - 我使用echo來打印出來,我不能?因爲它的.asp? –

+0

'asp.net'沒有'echo',但[Response.Write(string)](http://msdn.microsoft.com/en-us/library/ms525585.aspx)[也見此](http:/ /naspinski.net/post/inline-aspnet-tags-sorting-them-all-out-%283c25242c-3c253d2c-3c252c-3c252c-etc%29.aspx)。 –

+0

不,我寫它在PHP中,所以我使用回聲做和東西 –

相關問題