executing html within php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dannymc1983
Forum Commoner
Posts: 80
Joined: Wed Feb 16, 2005 7:24 am

executing html within php

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

include() maybe?
dannymc1983
Forum Commoner
Posts: 80
Joined: Wed Feb 16, 2005 7:24 am

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

redirect then.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

header('location: http://www.coolba.com'); does a instant redirect
Post Reply