Welcome Guest, Not a member yet? Register   Sign In
How to test the SET_SELECT from the Form Validation?
#1

[eluser]Sinclair[/eluser]
Hi,

I need to test the SET_SELECT from the Form Validatin class. I need to know if it is empty or not.

With the SET_VALUE I do this:
Code:
<?php
if (set_value('tpessoal') == '') {
   echo $dados_anuncios_em_insercao_editar->telefone_privado;
} else {
   echo set_value('tpessoal');
}
?>

How can I test if the SET_SELECT is empty or not?


Best Regards,
#2

[eluser]Sinclair[/eluser]
Ok, I test the SET_SELECT like this:
Code:
<?php
if (set_select('data_nascimento_dia', '31') <> 'selected="selected"') {  
   if (substr($dados_anuncios_em_insercao_editar->dat_nasc, 8, 2) == '31') {
      echo 'selected';
   }
}
?&gt;




Theme © iAndrew 2016 - Forum software by © MyBB