evo koda
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>First step of registration</title>
<link REL="StyleSheet" TYPE="text/css" HREF="/styles.css">
<link rel="stylesheet" href="/js/calendar/themes/aqua.css" />
<!-- Loading Calendar JavaScript files -->
<script type="text/javascript" src="/js/calendar/src/utils.js"></script>
<script type="text/javascript" src="/js/calendar/src/calendar.js"></script>
<script type="text/javascript" src="/js/calendar/src/calendar-setup.js"></script>
<!-- Loading language definition file -->
<script type="text/javascript" src="/js/calendar/lang/calendar-en.js"></script>
<script language="JavaScript">
<!-- Begin
function validateEmail (valfield, // element to be validated
infofield, // id of element to receive info/error msg
required) // true if required
{
var stat = commonCheck (valfield, infofield, required);
if (stat != proceed) return stat;
var tfld = trim(valfield.value); // value of field with whitespace trimmed off
var email = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ;
if (!email.test(tfld)) {
msg (infofield, "error", "ERROR: not a valid e-mail address");
setfocus(valfield);
return false;
}
var email2 = /^[A-Za-z][\w.-]+@\w[\w.-]+\.[\w.-]*[A-Za-z][A-Za-z]$/ ;
if (!email2.test(tfld))
msg (infofield, "warn", "Unusual e-mail address - check if correct");
else
msg (infofield, "warn", "");
return true;
}
function checkFields() {
checkSex = (document.firstStepForm.sex.value);
checkFirstName = (document.firstStepForm.firstName.value);
checkLastName = (document.firstStepForm.lastName.value);
checkBirth = (document.firstStepForm.birth.value);
checkStreet = (document.firstStepForm.street.value);
checkZip = (document.firstStepForm.zip.value);
checkTown = (document.firstStepForm.town.value);
checkCountry = (document.firstStepForm.country.value);
checkNationality = (document.firstStepForm.nationality.value);
checkEmail = (document.firstStepForm.email.value);
if (checkSex == "") {
alert("Please ensure that you entered Sex");
return false;
}
if (checkFirstName == "") {
alert("Please ensure that you entered your first name");
return false;
}
if (checkLastName == "") {
alert("Please ensure that you entered your last name");
return false;
}
if (checkBirth == "") {
alert("Please ensure that you entered your Birth");
return false;
}
if (checkStreet == "") {
alert("Please ensure that you entered Street where you live");
return false;
}
if (checkZip == "") {
alert("Please ensure that you entered your Postal Code / ZIP");
return false;
}
if (checkTown == "") {
alert("Please ensure that you entered your Town");
return false;
}
if (checkCountry == "") {
alert("Please ensure that you entered your Country");
return false;
}
if (checkNationality == "") {
alert("Please ensure that you entered your Nationality");
return false;
}
if (checkEmail == "" ) {
alert("Please ensutre that you entered your Email");
return false;
}
else return true;
}
// End -->
</script>
</head>
<body>
<!--Including Head-->
<?php include('http://localhost/learn-german/head.html'); ?>
<form method="POST" action="secondStep.php" name="firstStepForm" id="firstStepForm" onsubmit="return checkFields()">
<table align="center" class="formular" style="margin-top:20px;">
<tr>
<td align="right"><img src="../MyHomepage/my/images/formStepsFotoStep1.jpg" alt="firstStep" width="190" height="14" /></td>
</tr>
</table>
<table align="center" class="formular" style="margin-top:20px; border-bottom-style:none">
<tr>
<td>
<div style="text-align:center; color:#7F9DB9; font-weight:bold; font-size:14px; font-family:Arial, Helvetica, sans-serif;" >Personal Informations</div>
</td>
</tr>
</table>
<table align="center" class="formular">
<tr>
<td width="175" class="formular">Sex * </td>
<td width="145" style="color:#0033CC" class="formular">
<input class="myBox" type="radio" name="sex" value="Female" checked="checked" />
Female
<input class="myBox" type="radio" name="sex" value="Male" />
Male
<br />
</td>
</tr>
<tr>
<td class="formular">First Name * </td>
<td class="formular">
<input class="myBox" type="text" name="firstName" tabindex="3" value="<?php if(isset($_SESSION['firstName'])) { echo $_SESSION['firstName'];}?>" /></td>
</tr>
<tr>
<td class="formular">Last Name * </td>
<td class="formular"><input class="myBox" type="text" name="lastName" tabindex="4" /></td>
</tr>
<tr>
<td class="formular">Date of Birth * </td>
<td class="formular"><input class="myBox" type="text" name="birth" tabindex="5" />
</td>
</tr>
<tr>
<td class="formular">Street * </td>
<td class="formular"><input class="myBox" type="text" name="street" tabindex="6" /></td>
</tr>
<tr>
<td class="formular">Postal Code / ZIP * </td>
<td class="formular"><input class="myBox" type="text" name="zip" tabindex="7" /></td>
</tr>
<tr>
<td class="formular">Town * </td>
<td class="formular"><input class="myBox" type="text" name="town" tabindex="8" /></td>
</tr>
<tr>
<td class="formular">Country * </td>
<td class="formular"><input class="myBox" type="text" name="country" tabindex="9" /></td>
</tr>
<tr>
<td class="formular">Nationality * </td>
<td class="formular"><input class="myBox" type="text" name="nationality" tabindex="10" /></td>
</tr>
<tr>
<td class="formular">Place of Birth </td>
<td class="formular"><input class="myBox" type="text" name="placeOfBirth" tabindex="11" /></td>
</tr>
<tr>
<td class="formular">Phone </td>
<td class="formular"><input class="myBox" type="text" name="phone" tabindex="12" /></td>
</tr>
<tr>
<td class="formular">Fax</td>
<td class="formular"><input class="myBox" type="text" name="fax" tabindex="13" /></td>
</tr>
<tr>
<td class="formular">Profession</td>
<td class="formular"><input class="myBox" type="text" name="profession" tabindex="14" /></td>
</tr>
<tr>
<td class="formular">Email * </td>
<td class="formular"><input class="myBox" type="text" name="email" tabindex="15" /></td>
</tr>
<tr>
<td class="formular">
<br /><br />
<input type="hidden" name="send" value="true" class="myBox">
<input class="myFormularContinueButton" type="submit" name="continueButton" value="Continue">
<input class="myFormularContinueButton" type="reset" name="resetButton" value="Reset" />
</td>
</tr>
</table>
</form>
<!--Including Tail-->
<?php include('http://localhost/learn-german/tail.html'); ?>
</body>
</html>
To je prva stranica, onda idu jos dve posle nje s slicnim kontekstom, i na kraju je stranica gde korisnik moze kliknuti na EDIT:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Third step off registration</title>
<link REL="StyleSheet" TYPE="text/css" HREF="/styles.css">
</head>
<body>
<?php include('http://localhost/learn-german/head.html'); ?>
<table align="center" class="formular" style="margin-top:20px; border-bottom:none;">
<tr>
<td>
<div style="text-align:center; color:#7F9DB9; font-weight:bold; font-size:14px; font-family:Arial, Helvetica, sans-serif;" >You have provided following informations</div>
</td>
</tr>
<table align="center" class="formular">
<tr>
<td width="175" class="formular">Sex </td>
<td width="145" class="formularBlueText"><?php print "{$_POST['sex']}"; ?></td>
</tr>
<tr>
<td class="formular">First Name </td>
<td class="formularBlueText"><?php print "{$_POST['firstName']}"; ?></td>
<tr>
<td class="formular">Last Name * </td>
<td class="formularBlueText"><?php print "{$_POST['lastName']}"; ?></td>
</tr>
<tr>
<td class="formular">Date of Birth * </td>
<td class="formularBlueText"><?php print "{$_POST['birth']}"; ?></td>
</tr>
<tr>
<td class="formular">Street * </td>
<td class="formularBlueText"><?php print "{$_POST['street']}"; ?></td>
</tr>
<tr>
<td class="formular">Postal Code / ZIP * </td>
<td class="formularBlueText"><?php print "{$_POST['zip']}"; ?></td>
</tr>
<tr>
<td class="formular">Town * </td>
<td class="formularBlueText"><?php print "{$_POST['town']}"; ?></td>
</tr>
<tr>
<td class="formular">Country * </td>
<td class="formularBlueText"><?php print "{$_POST['country']}"; ?></td>
</tr>
<tr>
<td class="formular">Nationality * </td>
<td class="formularBlueText"><?php print "{$_POST['nationality']}"; ?></td>
</tr>
<tr>
<td class="formular">Place of Birth </td>
<td class="formularBlueText"><?php print "{$_POST['placeOfBirth']}"; ?></td>
</tr>
<tr>
<td class="formular">Phone </td>
<td class="formularBlueText"><?php print "{$_POST['phone']}"; ?></td>
</tr>
<tr>
<td class="formular">Fax</td>
<td class="formularBlueText"><?php print "{$_POST['fax']}"; ?></td>
</tr>
<tr>
<td class="formular">Profession</td>
<td class="formularBlueText"><?php print "{$_POST['profession']}"; ?></td>
</tr>
<tr>
<td class="formular">Email * </td>
<td class="formularBlueText"><?php print "{$_POST['email']}"; ?></td>
</tr>
<tr>
<td class="formular">Course Typ *</td>
<td class="formularBlueText"><?php print "{$_POST['courseList']}"; ?></td>
</tr>
<tr>
<td class="formular">Course Date *</td>
<td class="formularBlueText"><?php print "{$_POST['dateList']}"; ?></td>
</tr>
<tr>
<td class="formular">How many weeks *</td>
<td class="formularBlueText"><?php print "{$_POST['courseWeeks']}"; ?></td>
</tr>
<tr>
<td class="formular">German Knowledge *</td>
<td class="formularBlueText"><?php print "{$_POST['knowledgeList']}"; ?></td>
</tr>
<tr>
<td class="formular">Accommodation </td>
<td class="formularBlueText"><?php print "{$_POST['accommodationType']}"; ?></td>
</tr>
</table>
<?php include('http://localhost/learn-german/tail.html'); ?>
</body>
</html>
Sta trebam jos uraditi i kod zadnje stranice?