could someone help me on this..
the if else statement (bold letters) is not working..
and only the if statement is running and it seems the whole condition too
i included the whole code so that everyone can see what i want to do..
<html>
<head>
<title>Untitled Document</title>
<link rel="stylesheet" href="windowfiles/dhtmlwindow.css" type="text/css" />
<script type="text/javascript" src="windowfiles/dhtmlwindow.js"></script>
<link rel="stylesheet" href="modalfiles/modal.css" type="text/css" />
<script type="text/javascript" src="modalfiles/modal.js"></script>
<style type="text/css">
<!--
#Layer9 {
position:absolute;
width:124px;
height:25px;
z-index:1;
left: 69px;
top: -54px;
}
#Layer11 {
position:absolute;
width:200px;
height:115px;
z-index:2;
}
-->
</style>
</head>
<html>
<head>
<title></title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:782px;
height:115px;
z-index:1;
left: 406px;
top: 81px;
}
#Layer2 {
position:absolute;
width:359px;
height:24px;
z-index:2;
left: 73px;
top: -7px;
}
#Layer3 {
position:absolute;
width:481px;
height:22px;
z-index:2;
left: 73px;
top: 32px;
}
#Layer4 {
position:absolute;
width:18px;
height:23px;
z-index:2;
left: 73px;
top: 72px;
}
#Layer5 {
position:absolute;
width:150px;
height:22px;
z-index:2;
left: 73px;
top: 110px;
}
#Layer6 {
position:absolute;
width:121px;
height:21px;
z-index:2;
left: 72px;
top: 147px;
}
#Layer7 {
position:absolute;
width:87px;
height:25px;
z-index:2;
left: 72px;
top: 186px;
}
#Layer8 {
position:absolute;
width:58px;
height:25px;
z-index:2;
left: 4px;
top: 278px;
}
select {
height: 20px;
width: 320px;
max-height: 20px;
}
-->
</style>
</head>
<body background="naruto_wrapper_background2.JPG">
<center><font size=6>Client Info</font></center>
<div id="Layer1">
<form action= "educbg.php" method="post">
<?PHP echo "Name:";?>
<div id="Layer2">
<input name="name" type="text" size="70" maxlength="50" >
</div>
<br>
<br>
<?PHP echo "Address:";?>
<div id="Layer3">
<input name="address" type="text" size="80" maxlength="100">
</div>
<br>
<br>
<?PHP echo "Tel no:";?> <br>
<br>
<div id="Layer4">
<input name="telno" type="text" size="7" maxlength="7">
</div>
<?PHP echo "Country:";?>
<div id="Layer5">
<select name="country" size="1">
<option>
<option>none
<option>Afghanistan
<option>Albania
<option>Algeria
<option>American Samoa
<option>Andorra
<option>Angola
<option>Anguilla
<option>Antarctica
<option>Antigua and Barbuda
<option>Argentina
<option>Armenia
<option>Aruba
<option>Australia
<option>Austria
<option>Azerbaijan
<option>Bahamas
<option>Bahrain
<option>Bangladesh
<option>Barbados
<option>Belarus
<option>Belgium
<option>Belize
<option>Benin
<option>Bermuda
<option>Bhutan
<option>Bolivia
<option>Bosnia and Herzegowina
<option>Botswana
<option>Bouvet Island
<option>Brazil
<option>British Indian Ocean Territory
<option>Brunei Darussalam
<option>Bulgaria
<option>Burkina Faso
<option>Burundi
<option>Cambodia
<option>Cameroon
<option>Canada
<option>Cape Verde
<option>Cayman Islands
<option>Central African Republic
<option>Chad
<option>Chile
<option>China
<option>Christmas Island
<option>Cocos (Keeling) Islands
<option>Colombia
<option>Comoros
<option>Congo
<option>Congo, the Democratic Republic of the
<option>Cook Islands
<option>Costa Rica
<option>Cote d'Ivoire
<option>Croatia (Hrvatska)
<option>Cuba
<option>Cyprus
<option>Czech Republic
<option>Denmark
<option>Djibouti
<option>Dominica
<option>Dominican Republic
<option>East Timor
<option>Ecuador
<option>Egypt
<option>El Salvador
<option>Equatorial Guinea
<option>Eritrea
<option>Estonia
<option>Ethiopia
<option>Falkland Islands (Malvinas)
<option>Faroe Islands
<option>Fiji
<option>Finland
<option>France
<option>France, Metropolitan
<option>French Guiana
<option>French Polynesia
<option>French Southern Territories
<option>Gabon
<option>Gambia
<option>Georgia
<option>Germany
<option>Ghana
<option>Gibraltar
<option>Greece
<option>Greenland
<option>Grenada
<option>Guadeloupe
<option>Guam
<option>Guatemala
<option>Guinea
<option>Guinea-Bissau
<option>Guyana
<option>Haiti
<option>Heard and Mc Donald Islands
<option>Holy See (Vatican City State)
<option>Honduras
<option>Hong Kong
<option>Hungary
<option>Iceland
<option>India
<option>Indonesia
<option>Iran (Islamic Republic of)
<option>Iraq
<option>Ireland
<option>Israel
<option>Italy
<option>Jamaica
<option>Japan
<option>Jordan
<option>Kazakhstan
<option>Kenya
<option>Kiribati
<option>Korea, Democratic People's Republic of
<option>Korea, Republic of
<option>Kuwait
<option>Kyrgyzstan
<option>Lao People's Democratic Republic
<option>Latvia
<option>Lebanon
<option>Lesotho
<option>Liberia
<option >Libyan Arab Jamahiriya
<option>Liechtenstein
<option>Lithuania
<option>Luxembourg
<option>Macau
<option>Macedonia, The Former Yugoslav Republic of
<option>Madagascar
<option>Malawi
<option>Malaysia
<option>Maldives
<option>Mali
<option>Malta
<option>Marshall Islands
<option>Martinique
<option>Mauritania
<option>Mauritius
<option>Mayotte
<option>Mexico
<option>Micronesia, Federated States of
<option>Moldova, Republic of
<option>Monaco
<option>Mongolia
<option>Montserrat
<option>Morocco
<option>Mozambique
<option>Myanmar
<option>Namibia
<option>Nauru
<option>Nepal
<option>Netherlands
<option>Netherlands Antilles
<option>New Caledonia
<option>New Zealand
<option>Nicaragua
<option>Niger
<option>Nigeria
<option>Niue
<option>Norfolk Island
<option>Northern Mariana Islands
<option>Norway
<option>Oman
<option>Pakistan
<option>Palau
<option>Panama
<option>Papua New Guinea
<option>Paraguay
<option>Peru
<option>Philippines
<option>Pitcairn
<option>Poland
<option>Portugal
<option>Puerto Rico
<option>Qatar
<option>Reunion
<option>Romania
<option>Russian Federation
<option>Rwanda
<option>Saint Kitts and Nevis
<option>Saint LUCIA
<option>Saint Vincent and the Grenadines
<option>Samoa
<option>San Marino
<option>Sao Tome and Principe
<option>Saudi Arabia
<option>Senegal
<option>Seychelles
<option>Sierra Leone
<option>Singapore
<option>Slovakia (Slovak Republic)
<option>Slovenia
<option>Solomon Islands
<option>Somalia
<option>South Africa
<option>South Georgia and the South Sandwich Islands
<option>Spain
<option>Sri Lanka
<option>St. Helena
<option>St. Pierre and Miquelon
<option>Sudan
<option>Suriname
<option>Svalbard and Jan Mayen Islands
<option>Swaziland
<option>Sweden
<option>Switzerland
<option>Syrian Arab Republic
<option>Taiwan, Province of China
<option>Tajikistan
<option>Tanzania, United Republic of
<option>Thailand
<option>Togo
<option>Tokelau
<option>Tonga
<option>Trinidad and Tobago
<option>Tunisia
<option>Turkey
<option>Turkmenistan
<option>Turks and Caicos Islands
<option>Tuvalu
<option>Uganda
<option>Ukraine
<option>United Arab Emirates
<option>United Kingdom
<option>United States
<option>United States Minor Outlying Islands
<option>Uruguay
<option>Uzbekistan
<option>Vanuatu
<option>Venezuela
<option>Viet Nam
<option>Virgin Islands (British)
<option>Virgin Islands (U.S.)
<option>Wallis and Futuna Islands
<option>Western Sahara
<option>Yemen
<option>Yugoslavia
<option>Zambia
<option>Zimbabwe
</select>
</div>
<br>
<br>
<?PHP echo "City:";?>
<div id="Layer6">
<input name="city" type="text" size="30" maxlength="30">
</div>
<div id="Layer7">
<input name="bday" type="text" size="20" maxlength="20">
</div>
<br>
<br>
<?PHP echo "Birthday:";?> <br>
<br>
<?PHP echo "Age:";?> <br>
<br>
<div id="Layer8">
<div id="Layer9">
<input name="age" type="text" size="3" maxlength="3" />
</div>
<script type="text/javascript">
function success(){
successwindow=dhtmlmodal.open('successbox', 'div', 'modalalertdiv2', 'Untitled', 'width=350px,height=150px,left=150px,top=100px,resize=0,scrolling=0')
}
function process_app1(button){
if (button=="yes")
window.location.href = 'display.php';
successwindow.hide()
}
</script>
<script type="text/javascript">
function xsuccess(){
xsuccesswindow=dhtmlmodal.open('xsuccessbox', 'div', 'modalalertdiv', 'Untitled', 'width=350px,height=150px,left=150px,top=100px,resize=0,scrolling=0')
}
function process_app2(button){
if (button=="yes")
xsuccesswindow.hide()
}
</script>
[B]<?PHP
if (empty($_POST['name']) || empty($_POST['address']) || empty($_POST['telno']) || empty($_POST['country']) || empty($_POST['city']) || empty($_POST['bday']) || empty($_POST['age'])) {
include("xsuccess.php"); }
else {
include("success.php"); }
?>[/B]
</form>
</div>
<div id="modalalertdiv2" style="display:none;">
<div style="background: #F3F3F3; height: 100%; padding: 5px">
<center><br /><br />
<?PHP
echo("Successful Application.<br>");
?>
<br />
<form id="success">
<input type="button" value="Next" style="margin-right: 20px" onClick="process_app1('yes')" name="Next"/>
</form>
</center>
</div>
</div>
<div id="modalalertdiv" style="display:none;">
<div style="background: #F3F3F3; height: 100%; padding: 5px">
<center><br /><br />
<?PHP
echo("Unsuccessful Application.<br>");
echo("Please complete the whole form.");
?>
<br />
<form id="xsuccess">
<input type="button" value="Close" style="margin-right: 20px" onClick="process_app2('yes')" name="Close"/>
</form>
</center>
</div>
</div>
</body>
</html>