|
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
Navigation:
[Reply to this message]
|