Reply to Re: if/else statement, form-check

Your name:

Reply:


Posted by David Haynes on 12/18/13 11:51

Ørjan Langbakk wrote:
> Den 28.06.2006 22:27, skriblet BKDotCom følgende:
>> psudocode:
>>
>> if ( invalid code )
>> redirect
>> elseif ( !email && !phone )
>> other redirect
>
> Well, yes, but that doesn't really work the way I want it.
>
> See, I have, first, a check for existing email - if there is no email
> present, I want it to check if there is a phonenumber entered, and if
> _both_ those conditions are false, then I want to redirect.
>
> I do not wish to redirect after the first false, but after the second.
>
> Have I misunderstood something, or?
>
>

Isn't this just:

if( ! email && ! phone ) redirect;
if( email ) do_email
else do_phone

-david-

[Back to original 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

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