## History: ## 02-Apr-2004 (fanra01) ## Bug 112091 ## Editorial changes from griel02. Create the Login Page

Create the Login Page

You must login to the ICE Server before you can access any pages held under its control. Here is an example of a login page where web users can create for themselves an account by leaving the entry fields blank:

File: play_login.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!-- Copyright (c) 2004 Computer Associates International, Inc. --> 
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK HREF="/ice/styles/play_public.css" TYPE="text/css" REL="STYLESHEET">
<title>Shakespeare Plays </title>
</HEAD>
<body>
<center>
<H1>Shakespeare Plays </H1></TD>
</center>
Thank you for visiting the Globe centre for Shakespeare.
<p>
If you are a new visitor to our site, leave the
user name and password fields <i>blank.</i> 
<br>
Click on the
picture of the original Globe below and you will be 
taken to another page from whence you
will be able to register with us. 
<p>
If you already have an account, please fill in
your user name and password below. 
<br>
Click on the
picture of the original Globe below.
<p>
We hope you enjoy your visit!
<HR>

<BODY>
<FORM ACTION="/ice-bin/oiice.dll/plays[play_home.html]" METHOD="POST">
<INPUT TYPE=hidden NAME="ii_action" value="connect">
<INPUT TYPE=hidden NAME="ii_error_url" value="/plays[play_autoUser.html]">
<CENTER>
<TABLE BORDER=0 ALIGN=CENTER VALIGN=CENTER>
	<TR>
		<TD>Please enter your:</TD>
	</TR>
	<TR>
		<TD>Name: </TD>
		<TD><INPUT SIZE=32 NAME="ii_userid"></TD>
	</TR>
	<TR>
		<TD>Password: </TD>
		<TD><INPUT SIZE=32 TYPE=PASSWORD NAME="ii_password"></TD>
	</TR>
</TABLE>		
<INPUT TYPE="IMAGE" BORDER=0 NAME="connect" SRC="/ice/OldGlobe.gif" ALT="Press Here to Enter the Globe Experience">
</CENTER>
</FORM>
</BODY>
</HTML>
This page sets the value of the hidden variable ii_action to "connect", collects the account name and password from the user, and passes them all to the page plays[play_home.html] when the user presses the connect button:
<FORM ACTION="/ice-bin/oiice.dll/plays[play_home.html]" METHOD="POST">
<INPUT TYPE=hidden NAME="ii_action" value="connect">
...
<INPUT TYPE="IMAGE" BORDER=0 NAME="connect" SRC="/iceimages/logout.gif" ALT="Connect">
If the user has no account, the login will fail and the failure action (specified by ii_error_url) takes them to the page plays[play_autoUser.html]. This page allows the user to create a new account. We will look at how to do that later. First we will take a quick look at the home page for our system.