I've got a script that is moving through the FTP process, and testing multiple nested conditions. What I'd like to do is handle the error directly inside the IF statement, provided it's possible. Similar to the " or die()".

Pseudo-example:

if($conn = (ftp_connect OR $error = "failed to connect"))
{
if(ftp_login OR $error = "failed login")
{
if(ftp_put OR $error = "failed transfer"){}
}
}

If something like this is possible, it'd save a lot of lines of code. Thanks guys.