You are here: Re: help with posting conditional if statement « PHP Programming Language « IT news, forums, messages
Re: help with posting conditional if statement

Posted by Rami Elomaa on 05/04/07 18:56

Erwin Moller kirjoitti:
> Simon Stewart wrote:
>
>> Art
>>
>> Try something like this.
>>
>> $holdchk= (strlen ($_POST['B1'])>0 and strlen($_POST['app_fname'])==0);
>> $action= ($holdchk)? "some.php": "other.php";
>> echo "<form method='POST' action='$action'>";
>>
>> avoid isset and empty
>>
>
> Why avoid isset?

I don't think he knows what he's talking about. isset is essential.

> I use that function in every script that receives clientinformation...
> Couldn't live without it.

Same here. And it's really handy when using forms with multiple submit
buttons, to see which was pressed. (print, edit, delete, for example.)

> Personally I think your posted code is a bad example on how to solve it...
> You need to read it twice and rethink it. Clear code is better and happens
> to use isset().

Yeah, the example is indeed a bit messy. And concidering the level of
the OP, it's no help at all, it only confuses more. The OP requires the
"php for dummies" answer.

--
Rami.Elomaa@gmail.com

"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze

 

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

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