Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Dec : Need help IdHTTP Post

www.cryer.info
Managed Newsgroup Archive

Need help IdHTTP Post

Subject:Need help IdHTTP Post
Posted by:"Nguyen Nhat Dung" (kenshin11..@gmail.com)
Date:Wed, 12 Dec 2007 13:12:20

i use IdHTTP.POST to login a page.
normally i use like this
var param : TStrings;

param := TStringList.Create;
param.Add('username=abc');
param.Add('password=def');
param.Add('Submit=login');
IdHttp.Post('url', param);
param.free;

it work for me in somesite. but this site doesn't work :

<form method="post" action="member_login.php">
      <table style="border-collapse: collapse;" border="1"
bordercolor="#c8d3e5" cellpadding="0" cellspacing="0" width="280">
       <tbody><tr><td>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
         <tbody><tr><td class="hdr_bar"><img
src="/images/hdr/seperator2.gif" border="0"> </td></tr>
        </tbody></table>
        <table border="0" cellpadding="3" cellspacing="0" width="100%">
         <tbody><tr><td class="title" align="right" width="21%">Email</td>

         <td><input name="username" value="" style="width: 180px;
background-color: rgb(255, 255, 160);" type="text"></td></tr>
         <tr><td class="title" align="right"></td>
         <td><input class="txt" name="password" style="width: 180px;"
type="password"></td></tr>
         <tr><td align="right">
         <input id="auto_login" checked="checked" class="txt"
name="auto_login" value="1" type="checkbox">&nbsp;
         </td><td>
         <label for="auto_login">auto login?</label>
         </td></tr>
         <tr><td>

         </td><td>
         <input name="submit_login" value="Dang Nhap" class="btnSubmit"
type="submit">
         </td></tr>
        </tbody></table>
        </td></tr>
       </tbody></table>
       <input name="detail" value="" type="hidden">
       <input name="fwdurl" value="" type="hidden">
       <input name="submit_fcheck" value="1" type="hidden">
       </form>

what is the parameter i must enter for 'Submit=' ?
  <input name="submit_login" value="Dang Nhap" class="btnSubmit"
type="submit">

thanks

Replies:

www.cryer.info
Managed Newsgroup Archive