Código PHP:
Ver original<div id="container1">
<div align="right" style="padding-right:10px;">
<div style="float:right"><img src="images/Picture1.png" style="width:250px;" /></div>
<div class="sequence_text">
<?php if(isset($_SESSION['fullname'])&&($_SESSION['fullname'] != "")){ echo $_SESSION['fullname'];}?></div>
</div>
</div>
<div id="shadow2"></div>
<div id="container2">
<div id="formBox">
<form name="form1" id="form1" method="post" onSubmit="return checkEmpty();" action="process/<?php echo $action.'.php';?>">
<input type="hidden" name="action" id="action" value="
<?php if(isset($switch_option)&&($switch_option != "")){ echo $switch_option;}?>" />
<input type="hidden" name="page" id="page" value="2" />
<table width="100%" border="00" cellspacing="00" cellpadding="00">
<tr>
<td width="17%" height="81" colspan="2" align="center" valign="middle"><h2>DATOS GENERALES - Información Básica</h2>
<div style="text-align:left">En esta sección le solicitamos información básica sobre su persona, su familia y sobre otros temas de interés general para DIAMANTE que ayudan a agilizar el proceso de selección. Agradecemos conteste todas las preguntas que apliquen en su caso.
</div>
</td>
</tr>
<tr>
<td height="45" colspan="2"><table width="100%" border="0" cellspacing="00" cellpadding="00" class="bgcolor">
<tr>
<td width="15.5%" height="37" align="left" valign="middle"><p><span class="error">*</span>Vive en</p></td>
<td width="12%" align="left" valign="middle"><p>
<?php
$residence_type = array('Apartamento','Casa','Inquilinato');
?>
<select name="residence_type" id="residence_type" class="drpdwn-sml">
<option selected="selected" value="" disabled="disabled">Seleccione</option>
<?php foreach($residence_type as $value){?>
<option
<?php if(isset($canidateBasicDetails['residence_type'])&&($canidateBasicDetails['residence_type'] == $value)){?> selected="selected"
<?php }?> value="
<?php echo $value;?>">
<?php echo $value;?></option>
<?php } ?>
</select>
<span class="error" id="error_residence_type" style="float:left"></span>
</p></td>
<td width="10%" align="left" nowrap="nowrap" valign="middle"><p><span class="error">*</span>Desde cuándo vive ahí?</p></td>
<td width="20%" align="left" valign="middle">
<?php
$months = array('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic');
?>
<select name="living_duration_month" id="living_duration_month" class="select" >
<option selected="selected" value="" disabled="disabled">Mes</option>
<?php
foreach($months as $val){
?>
<option
<?php if(isset($canidateBasicDetails['living_duration_month'])&&($canidateBasicDetails['living_duration_month'] == $val)){?> selected="selected"
<?php }?> value="
<?php echo $val;?>">
<?php echo $val;?></option>
<?php } ?>
</select>
<select name="living_duration_year" id="living_duration_year" class="select">
<option selected="selected" value="" disabled="disabled">Año</option>
<?php
for($i=date('Y')-50;$i<=date('Y');$i++){ ?>
<option
<?php if(isset($canidateBasicDetails['living_duration_year'])&&($canidateBasicDetails['living_duration_year'] == $i)){?> selected="selected"
<?php }?> value="
<?php echo $i;?>">
<?php echo $i;?></option>
<?php }?>
</select>
<span class="error" id="error_living_duration" style="float:left"></span>
</td>
<td width="11%" align="left" valign="middle" nowrap="nowrap"><p> <span class="error">*</span>La vivienda es
</p></td>
<td align="left" valign="middle"><select name="residence_ownership_type" id="residence_ownership_type" class="select_mid" onchange="hide_show();">
<option selected="selected" value="" disabled="disabled">Seleccione</option>
<option value="Propia"
<?php if(isset($canidateBasicDetails['residence_ownership_type'])&&($canidateBasicDetails['residence_ownership_type'] == "Propia")){?> selected="selected"
<?php }?>>Propia</option>
<option value="Arrendada"
<?php if(isset($canidateBasicDetails['residence_ownership_type'])&&($canidateBasicDetails['residence_ownership_type'] == "Arrendada")){?> selected="selected"
<?php }?>>Arrendada</option>
<option value="Prestada"
<?php if(isset($canidateBasicDetails['residence_ownership_type'])&&($canidateBasicDetails['residence_ownership_type'] == "Prestada")){?> selected="selected"
<?php }?>>Prestada</option>
</select>
<span class="error" id="error_residence_ownership_type" style="float:left"></span>
</td>
</tr>
</table></td>
</tr>
<?php if(isset($canidateBasicDetails['residence_ownership_type'])&&($canidateBasicDetails['residence_ownership_type'] == "Arrendada")){ $display="";
}else{
$display="none";
}?>
<tr id="showArrendada" style="display:<?php echo $display;?>">
<td colspan="2"><table width="100%" border="00" cellspacing="00" cellpadding="00" class="bgcolor">
<tr>
<td width="30%" align="left" valign="middle" height="40"><p>Si es arrendatario, nombre del arrendador
</p></td>
<td width="20%" align="left" valign="middle"><input type="text" name="landlord_name" id="landlord_name" value="
<?php if(isset($canidateBasicDetails['landlord_name'])&&($canidateBasicDetails['landlord_name'] != "")){ echo $canidateBasicDetails['landlord_name'];
}?>" autocomplete="off" /></td>
<td width="30%" align="left" valign="middle"><p>Teléfono del arrendador
</p></td>
<td width="20%" align="left" valign="middle"><input type="text" name="landlord_phone" id="landlord_phone" value="
<?php if(isset($canidateBasicDetails['landlord_phone'])&&($canidateBasicDetails['landlord_phone'] != "")){ echo $canidateBasicDetails['landlord_phone'];
}?>" autocomplete="off" /></td>
</tr>
</table>
<tr>
<table width="100%" border="00" cellspacing="00" cellpadding="00" class="bgcolor">
<tr>
<td width="30%" height="38" align="left" valign="middle"><p><span class="error">*</span>Cuántas personas viven con Ud?
</p></td>
<td width="20%" align="left" valign="middle"><p>
<input type="text" name="no_pople_living" id="no_pople_living" onkeyup="checkNum('no_pople_living','error_no_pople_living')" value="
<?php if(isset($canidateBasicDetails['no_pople_living'])&&($canidateBasicDetails['no_pople_living'] != "")){ echo $canidateBasicDetails['no_pople_living'];
}?>" autocomplete="off" />
<span class="error" id="error_no_pople_living" style="float:left"></span>
</p></td>
<td colspan="2">
<tr><table>
<td align="left" valign="middle"><p><span class="error">*</span>Qué relación tiene con ellas?
</p></td>
<td width="15%" align="left" valign="middle"><p>
<select name="relationship_type_them" id="relationship_type_them" class="select_mid">
<option selected="selected" value="" disabled="disabled">Seleccione</option>
<option value="Familia"
<?php if(isset($canidateBasicDetails['relationship_type_them'])&&($canidateBasicDetails['relationship_type_them'] == "Familia")){?> selected="selected"
<?php }?>>Familia</option>
<option value="Amigos"
<?php if(isset($canidateBasicDetails['relationship_type_them'])&&($canidateBasicDetails['relationship_type_them'] == "Amigos")){?> selected="selected"
<?php }?>>Amigos</option>
<option value="Inquilinos"
<?php if(isset($canidateBasicDetails['relationship_type_them'])&&($canidateBasicDetails['relationship_type_them'] == "Inquilinos")){?> selected="selected"
<?php }?>>Inquilinos</option>
</select>