You are here: Re: checking if a cell is empty « All PHP « IT news, forums, messages
Re: checking if a cell is empty

Posted by Joseph Melnick on 05/23/05 17:13

Hello Asok,

try:

array_key_exists

ie

if(arraykey_exists('helper1_pos',$_POST){
echo 'sorry';
}
else
{
update();
}

Joseph Melnick
http://www.jphp.com/


"Ashok" <non2@mail.ru> wrote in message news:d6s84o$1521$1@gavrilo.mtu.ru...
> Hi,
> I need a condition in update form where before the form is updated, I have
> to check if the value of a cell is empty or not. If it is not empty, an
> error is shown and if empty, it is updated.
> What I am doing wrong in the script ( $_POST['helper1_pos'] gets value
> from
> the form). It shows error even if the cell is empty.
>
> if (!is_null($_POST['helper1_pos'])) {
> echo "Sorry! Helper 1 position already volunteered.";
> exit;
> }
> else {
> //update
> }
>
> Thanks.
> Ashok.
>
>

 

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

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