unit Unit1;//Á¬½ÓÊý¾Ý¿â£¬¼ÓÔØÓû§Õʺš£
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,unit2,unit3,StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
ComboBox1: TComboBox;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
with datamodule2 do
begin
adoquery1.Connection:=adoconnection1;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select * from login where user='''+trim(combobox1.Text)+''' and psw='''+trim(edit1.Text)+'''');
adoquery1.Active:=true;
if not adoquery1.Eof then
ÎÒÏÈÓÃidhttp µÄget·½·¨·ÃÎÊÒ»¸öÍøÕ¾£¬ÍøÕ¾·µ»ØÁËÒ»¶Îcookie£¬µ±ÎÒ µ÷Óà idhttp post·½·¨µÄʱºò£¬ÎÒÈçºÎ°Ñ·þÎñÆ÷·µ»ØµÄÕâ¶Îcookies´øÉÏ £¬ÏÈлл¸÷λÁË
¶ÁÈ¡ HTTP Response Header
ÀïÃæÓÐ Set-Cookies Óò ......