<HTML><BODY onload="document.MyForm.Name.focus()">
<?php

// Sticky forms.
// How to make the form remember the previous data.
/* In this example, we'll rememebr only data entered in text fields and
in text areas.
In the next example, we'll remember data entered by radio buttons, check
boxes, and selection lists.
*/

/* First get the input data. In the first run, there is no such data, so 
they'll be empty.
*/

$name = trim($_REQUEST['Name']);
$country = trim($_REQUEST['Country']);
$email = trim($_REQUEST['Email']);
$comments = trim(stripslashes($_REQUEST['Comments']));

echo <<< Begin

<TABLE WIDTH=80% ALIGN=center><TR><TD>

<fieldset>
<legend><B>
Please fill out this form and submit it.
</B></legend>

<CENTER>
<FORM NAME="MyForm" 
ACTION="{$_SERVER['PHP_SELF']}" METHOD="post">


<B>Name:</B>
<INPUT NAME="Name" SIZE=30 VALUE="$name">
<P>

<B>Country/State</B>
<INPUT NAME="Country" SIZE=30 VALUE=$country>
<P>

<B>Email:</B>
<INPUT NAME="Email" SIZE=30 VALUE="$email">
<P>

<B>Comments:</B>
<TEXTAREA NAME="Comments" ROWS=8 COLS=30 WRAP="virtual">
$comments
</TEXTAREA>


<CENTER><INPUT TYPE="submit" VALUE="SUBMIT"></CENTER> 
<INPUT TYPE="reset" VALUE="CLEAR">


</FORM></CENTER>
</fieldset>
</TD></TR></TABLE>
Begin;

$name = trim($_REQUEST['Name']);
$country = trim($_REQUEST['Country']);
$age = $_REQUEST['Age'];
$email = trim($_REQUEST['Email']);
$college = $_REQUEST['College'];
$comments = trim(stripslashes($_REQUEST['Comments']));
$ck = $_REQUEST['ck'];
$bcp = $_REQUEST['bcp'];

echo <<< Begin

You've entered:<P>
<B>Name:</B> "$name"<P>
<B>Country/State:</B> $country<P>
<B>Email:</B> $email<P>
<B>Comments:</B> <PRE>$comments</PRE><P>
</BODY></HTML>
Begin;
	
