well, you can do a couple things. YOU COULD just put all the code inside the if statement. OR, you could use include() and include the file (make sure you put the PHP tags in the include file). OR, you could redirect it to the required page. Of course, in order to do this, you cannot have already sent your HTTP headers.