You are here: Re: no empty form fields after submitting form « PHP Programming Language « IT news, forums, messages
Re: no empty form fields after submitting form

Posted by Michael Fesser on 09/16/07 11:43

..oO(pepper.gabriela@gmail.com)

>Little problem in page A, now:
>
>I imagine I must verify if I have 'something' in $_POST

if (!empty($_POST)) {
...
}

>(I get an Undefined Variable notice when I directly write:
>
> if($_POST[$k]!=''){
> ${$k}=$v;
> }

Even if the form was submitted and $_POST is not empty, you should check
every value if it exists before you use it. You could write a little
function for that.

You could also have a look at the extract() function, if you want to
convert the array into single variables. I don't consider that really
necessary, but anyway.

Micha

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация