Пример #1
0
						  CEP:  
						<input name="cep" type="text" id="cep" tabindex=14 onkeypress="Mascara('CEP',this,event); return Onlynumber(event);" size='12' maxlength="09" alt="CEP" />
						<span class="textoSobrescrito">*</span>
					</td>
				</tr>

				<tr>
					<td align='right'><label for=uf>UF:</label></td>
					<td>
                                            <select id="uf" name="uf" tabindex="15" >
                                                <option value="0" selected="selected">Escolha um Estado</option>
                                                <?php 
$banco = DB::getInstance();
$conexao = $banco->ConectarDB();
$unidadefederativa = new UnidadeFederativa(null, null);
$vetorunidadefederativa = $unidadefederativa->SelectByAll($conexao);
/* Varaveis auxiliares */
$i = 0;
$sel = "selected";
$total = count($vetorunidadefederativa);
while ($total > $i) {
    $nome = $vetorunidadefederativa[$i]->getNome();
    $codigo = $vetorunidadefederativa[$i]->getIdUnidadeFederativa();
    echo "<option value=" . $codigo . ">" . strtoupper($nome) . "</option>\n";
    $i = $i + 1;
}
?>
                                            </select>
                                            
                                            <span class="textoSobrescrito">*</span>