Reply to Code stubs

Your name:

Reply:


Posted by The Eclectic Electric on 11/10/06 16:40

Is there anything that can be used just as a "do nothing" line of code? I
wrote code to check user input on a "register" screen and I then re-used it
to make a "change preferences" option. On the register screen, each field
of the form must be set, whereas on the change preferences screen, it
doesn't matter since I already have the information in session variables.
Rather than remove the first condition and reverse each of the tests I've
basically changed it to a meaningless stub of code, but this is processing I
don't need to do. Is there a simpler way?

Register processing:

IF ( ( !ISSET( $_POST['userid'] ) ) || ( $_POST['userid'] == "" ) )
$_SESSION['err_userid'] = "1";
ELSE
{
// test other error conditions
}

Update processing:

IF ( ( !ISSET( $_POST['userid'] ) ) || ( $_POST['userid'] == "" ) )
$a = 0;
ELSE
{
// test other error conditions
}

+e

[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

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