Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit5;
- interface
- uses
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
- type
- TFrmSignUp = class(TForm)
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- BtnSignUp: TButton;
- EdtUsername: TEdit;
- EdtPassword: TEdit;
- EdtPassword2: TEdit;
- procedure BtnSignUpClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- UserFile : textfile;
- TextString : string;
- end;
- var
- FrmSignUp: TFrmSignUp;
- implementation
- {$R *.dfm}
- procedure TFrmSignUp.BtnSignUpClick(Sender: TObject);
- var Usr,Pss,pss2 : string;
- begin
- Usr := edtusername.Text;
- Pss := edtPassword.Text;
- Pss2 := edtPassword2.Text;
- if (Pss = Pss2) then
- begin
- Assignfile (userfile, 'LoginDetails.txt');
- Append(userfile);
- Writeln(userfile,Usr);
- Writeln(userfile,Pss);
- CloseFile(UserFile);
- showmessage ('success');
- close;
- end
- else
- begin
- ShowMessage('Sign up unsucessful, Please try again');
- end;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement