Forum Moderators: open
<form name="staffApplication" method="post" action="<?php echo ROOT_HTTP; ?>/index.php?option=apply&result=1">
<table align="center" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>
<div align="center" style="font-size:16pt; font-weight:bold;">2011 SUMMER CAMP STAFF EMPLOYMENT APPLICATION</div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center" style="font-size:8pt;">Completion of this form is an application only and NOT a guarantee of employment</div>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<fieldset style="border:1px solid #999;">
<legend style="font-size:12pt;"><b>Employment Information</b></legend>
<table align="center" cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td align="left">
Select Camp:
Horseshoe<input type="radio" name="campApplication" value="1">
Ware<input type="radio" name="campApplication" value="2">
No Preference<input type="radio" name="campApplication" value="3">
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<fieldset style="border:1px solid #999;">
<legend style="font-size:12pt;"><b>Personal Information</b></legend>
<table align="center" cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td align="left">
<input type="text" name="applicantName" size="60" value="Name" onblur="if(this.value=='') this.value='Name';" onfocus="if(this.value=='Name') this.value='';">
</td>
<td align="right">
<input type="text" name="applicantUnitNumber" size="30" value="Unit Number" onblur="if(this.value=='') this.value='Unit Number';" onfocus="if(this.value=='Unit Number') this.value='';">
</td>
</tr>
</table>
<table align="center" cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td align="left">
<input type="text" name="applicantHomeAddress" size="70" value="Home Address" onblur="if(this.value=='') this.value='Home Address';" onfocus="if(this.value=='Home Address') this.value='';">
</td>
<td align="right">
<input type="text" name="applicantHomePhone" size="20" value="Phone Number" onblur="if(this.value=='') this.value='Phone Number';" onfocus="if(this.value=='Phone Number') this.value='';">
</td>
</tr>
</table>
<table align="center" cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td align="left">
<input type="text" name="applicantHomeCity" size="53" value="City" onblur="if(this.value=='') this.value='City';" onfocus="if(this.value=='City') this.value='';">
</td>
<td align="center">
<input type="text" name="applicantHomeState" size="15" value="State" onblur="if(this.value=='') this.value='State';" onfocus="if(this.value=='State') this.value='';">
</td>
<td align="right">
<input type="text" name="applicantHomeZip" size="15" value="Zip Code" onblur="if(this.value=='') this.value='Zip Code';" onfocus="if(this.value=='Zip Code') this.value='';">
</td>
</tr>
</table>
<p><hr style="color:#999;" size="1"></p>
<table align="center" cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td align="left">
<input type="text" name="applicantCollegeAddress" size="70" value="College Address" onblur="if(this.value=='') this.value='College Address';" onfocus="if(this.value=='College Address') this.value='';">
</td>
<td align="right">
<input type="text" name="applicantCollegePhone" size="20" value="Phone Number" onblur="if(this.value=='') this.value='Phone Number';" onfocus="if(this.value=='Phone Number') this.value='';">
</td>
</tr>
</table>
<table align="center" cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td align="left">
<input type="text" name="applicantCollegeCity" size="53" value="City" onblur="if(this.value=='') this.value='City';" onfocus="if(this.value=='City') this.value='';">
</td>
<td align="center">
<input type="text" name="applicantCollegeState" size="15" value="State" onblur="if(this.value=='') this.value='State';" onfocus="if(this.value=='State') this.value='';">
</td>
<td align="right">
<input type="text" name="applicantCollegeZip" size="15" value="Zip Code" onblur="if(this.value=='') this.value='Zip Code';" onfocus="if(this.value=='Zip Code') this.value='';">
</td>
</tr>
</table>
<p><hr style="color:#999;" size="1"></p>
<table align="center" cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td align="left">
<input type="text" name="applicantEmail" size="59" value="Email Address" onblur="if(this.value=='') this.value='Email Address';" onfocus="if(this.value=='Email Address') this.value='';">
</td>
<td align="right">
Are you: <select name="applicantAgeRange">
<option value="0" selected="selected">- Select Age -</option>
<option value="1">Younger than 15 years old</option>
<option value="2">15 to 17 years old</option>
<option value="3">18 to 20 years old</option>
<option value="4">Over 21 years old</option>
</select>
</td>
</tr>
</table>
<p><hr style="color:#999;" size="1"></p>
<table align="center" cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td align="left">
Have you ever been convicted of a felony:
Yes<input type="radio" name="applicantFelony" value="2">
No<input type="radio" name="applicantFelony" value="1">
<div style="font-size:8pt;">(You may answer "no" if your conviction has been ordered sealed, expunged, or eradicated.)</div>
<div><br /><b>All</b> applicants over 18 will be expected to submit a <b>Request for Criminal Record.</b></div>
</td>
</tr>
</table>
<p><hr style="color:#999;" size="1"></p>
<table align="center" cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td width="28%">
Select T-Shirt Size:
</td>
<td width="12%">
S<input type="radio" name="applicantShirtSize" value="1">
</td>
<td width="12%">
M<input type="radio" name="applicantShirtSize" value="2">
</td>
<td width="12%">
L<input type="radio" name="applicantShirtSize" value="3">
</td>
<td width="12%">
XL<input type="radio" name="applicantShirtSize" value="4">
</td>
<td width="12%">
XXL<input type="radio" name="applicantShirtSize" value="5">
</td>
<td width="12%">
3XL<input type="radio" name="applicantShirtSize" value="6">
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
if($result == 1){
$info = $_POST;
// Validate the data
if($info['campApplication'] > 0){
if($info['applicantName']){
if($info['applicantUnitNumber']){
if($info['applicantHomeAddress']){
if($info['applicantHomePhone']){
if($info['applicantHomeCity']){
if($info['applicantHomeState']){
if($info['applicantHomeZip']){
if($info['applicantEmail']){
if($info['applicantAgeRange']){
if($info['applicantFelony']){
if($info['applicantShirtSize'] > 0){
if(($info['applicantAge'] >= 18) || ($info['applicantAge'] < 18 && $info['parentName'] && $info['parentPrimaryPhone'] && $info['parentEmail'] && $info['parentAltPhone'])){
if(($info['applicantAvailability'] == 1) || ($info['applicantAvailability'] == 2 && ($info['applicantAvailabilityStartDate'] && $info['applicantAvailabilityEndDate'] && $info['applicantAvailabilityEvent']))){
if($info['positionDesired'][1]){
if($info['positionDesired'][2]){
if($info['positionDesired'][3]){
if($info['positionDesired'][4]){
if($info['leadershipPositions']){
if($info['certifications']){
if($info['eagleScout']){
if($info['referenceName'][1] && $info['referenceAddress'][1] && $info['referencePhone'][1]){
if($info['referenceName'][2] && $info['referenceAddress'][2] && $info['referencePhone'][2]){
if($info['referenceName'][3] && $info['referenceAddress'][3] && $info['referencePhone'][3]){
$info = cleanupData($info);
$_SESSION['applicationInfo'] = $info;
echo displayConfirmation($info);
} else {
// Reference 3
echo "Please enter the information for your third reference";
}
} else {
// Reference 2
echo "Please enter the information for your second reference";
}
} else {
// Reference 1
echo "Please enter the information for your first reference";
}
} else {
// Eagle Scout
echo "Please select if you are an eagle scout";
}
} else {
// Certifications
echo "Please enter any certifications you have";
}
} else {
// Leadership
echo "Please enter the leadership experience you have";
}
} else {
// Position 4
echo "Please enter your forth choice for a position";
}
} else {
// Position 3
echo "Please enter your third choice for a position";
}
} else {
// Position 2
echo "Please enter your second choice for a position";
}
} else {
// Position 1
echo "Please enter your first choice for a position";
}
} else {
// Applicant Unavailable
echo "Please select your availablity";
}
} else {
// Under 18
echo "Please enter your parents information";
}
} else {
// Shirt Size
echo "Please select your shirt size";
}
} else {
// Felony
echo "Please select if you have been convicted of a felony";
}
} else {
// Age
echo "Please enter your age";
}
} else {
// Email
echo "Please enter your email address";
}
} else {
// Zip
echo "Please enter the zip code";
}
} else {
// State
echo "Please enter the state";
}
} else {
// City
echo "Please enter the city";
}
} else {
// Home Phone
echo "Please enter your home phone number";
}
} else {
// Address
echo "Please enter your address";
}
} else {
// Unit Number
echo "Please enter your unit number";
}
} else {
// Name
echo "Please enter your name";
}
} else {
// Select Camp
echo "Please select a camp";
}
}
document.onkeydown = trapKey;
function trapKey(evt) {
evt = (evt) ? evt : window.event;
if (evt) {
if (evt.keyCode == 8 && (evt.srcElement.type != "text" && evt.srcElement.type != "textarea" && evt.srcElement.type != "password")) {
// When backspace is pressed but not in form element
cancelKey(evt);
}
else if (evt.keyCode == 116) {
// When F5 is pressed
cancelKey(evt);
}
else if (evt.keyCode == 122) {
// When F11 is pressed
cancelKey(evt);
}
else if (evt.ctrlKey && (evt.keyCode == 78 || evt.keyCode == 82)) {
// When ctrl is pressed with R or N
cancelKey(evt);
}
else if (evt.altKey && evt.keyCode==37 ) {
// stop Alt left cursor
return false;
}
}
function cancelKey(evt) {
if (evt.preventDefault) {
evt.preventDefault();
return false;
}
else {
evt.keyCode = 0;
evt.returnValue = false;
}
}
if they click the back button to possibly go back to edit the page all of the data disappears. I am not sure how to fix the problem.
How would I check the headers to see if it is allowing caching?
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="Sat, 23 Oct 2010 00:00:00 GMT">
<meta http-equiv="Cache-Control" content="no-cache">