Afficher un message
Vieux 16/09/2007, 10h53   #9
pepper.gabriela@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: no empty form fields after submitting form

> I've even written a function that reads all of the elements in an array
> (e.g., $_POST) and creates hidden form fields for each one. It can even
> handle multi-dimensional arrays (e.g., $_POST variables that are
> themselves, an array).




Chuck, this sound really interesting, simple and powerful too:
at the moment, page B converts every key in a variable of the same
name:

foreach($_POST as $k => $v){
if(in_array($k,$required_keys)&&(trim($_POST[$k]!=''))){
${$k}=$v;
$count++;
}
}

it would be quite easy to use this foreach to build my fields :-)

Thanks!

  Réponse avec citation
 
Page generated in 0,09057 seconds with 9 queries