Welcome Guest, Not a member yet? Register   Sign In
Sending output to browser
#3

[eluser]steelaz[/eluser]
You're right, I don't have to, but I would prefer it to keep my coding style. This is what I like to do:

Code:
if ($step1 == FALSE)
{
    // Log error, etc,
    redirect('controller');
}
if ($step2 == FALSE)
{
    // Log error, etc,
    redirect('controller');
}

// No errors, do something

Instead of coding like this:

Code:
if ($step1 == TRUE)
{
    if ($step2 == TRUE)
    {
        // No errors, do something
    }
    else
    {
        // Log error, etc,
    }
}
else
{
    // Log error, etc,
}

But in this case, instead of redirecting on error I'd like to send custom output.


Messages In This Thread
Sending output to browser - by El Forum - 05-21-2009, 07:37 AM
Sending output to browser - by El Forum - 05-21-2009, 11:54 AM
Sending output to browser - by El Forum - 05-21-2009, 12:39 PM
Sending output to browser - by El Forum - 05-21-2009, 06:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB