Page 1 of 1

executing html within php

Posted: Sun Feb 27, 2005 2:42 pm
by dannymc1983
hey, does anyone know how to open a php page within a php script? like something that would perform similar actions to this piece of general php code:

Code: Select all

if (password == false)
               login = 0;
          if (password == true)
               login = 1;

          if (isset(login))
                //end the script and open file welcome.php
          else
                 //end the script and open file invalid_password.php

Posted: Sun Feb 27, 2005 2:51 pm
by feyd
include() maybe?

Posted: Sun Feb 27, 2005 3:11 pm
by dannymc1983
ya i thought that but include will just insert the code into the current script. i need it to close the current script and then open the script specified. any other ideas?

Posted: Sun Feb 27, 2005 3:17 pm
by feyd
redirect then.

Posted: Sun Feb 27, 2005 5:47 pm
by shiznatix
header('location: http://www.coolba.com'); does a instant redirect