Current location: Hot Scripts Forums » Programming Languages » PHP » Automatically loading page


Automatically loading page

Reply
  #1 (permalink)  
Old 08-27-03, 12:50 PM
mpalmen mpalmen is offline
New Member
 
Join Date: Aug 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Automatically loading page

Greetings !

Can anyone tell me what PHP code I should use when I want another page to be automatically loaded should part of a IF statement be activated ?

Basically I want something like this:

IF (statement TRUE)
{ load page automatically}
ELSE
{do another thing}

All suggestions are welcome.

Regards,

Maurice
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-27-03, 02:15 PM
ermau's Avatar
ermau ermau is offline
Wannabe Coder
 
Join Date: Aug 2003
Location: Florida, USA
Posts: 240
Thanks: 0
Thanked 0 Times in 0 Posts
Load as in go to another page?

PHP Code:

header("Location: http://yoururl/"); 

or as in load as in display in the current page?
PHP Code:

include_once('blah.html'); 

__________________
PHP / mySQL Developer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 08-28-03, 12:04 AM
Cagez's Avatar
Cagez Cagez is offline
Eeew, dirty!
 
Join Date: Jun 2003
Location: Toronto, Ontario
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
A note about header() though, if you've sent any headers already (cookies, session, or any output) then you'll get a "headers already sent" error.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 08-29-03, 05:27 PM
joeldg joeldg is offline
Newbie Coder
 
Join Date: Jul 2003
Location: New Orleans
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
umm...

Are you talking about page-switching?
i.e. dynamically include pages?

switch ($page){
case "home":
include "pages/home.php";
break;;
case "other":
include "pages/other.php";
break;;
}

something like that?

or what?
__________________
TAGword, ads the way you always wanted.
<a href="http://tagword.com">tagword.com</a>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 09-02-03, 06:40 PM
Zero-Tolerance Zero-Tolerance is offline
New Member
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
can do it in html <meta http-equiv="refresh" content="10; url=http://google.com">

wish ppl would try google b4 they post
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 09-02-03, 08:40 PM
Cagez's Avatar
Cagez Cagez is offline
Eeew, dirty!
 
Join Date: Jun 2003
Location: Toronto, Ontario
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
I wish people would read the posts before replying with useless complaints
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a php registration page codeguru21 Script Requests 3 11-07-03 02:02 PM
need to make a confirmation page codeguru21 PHP 1 10-02-03 05:18 PM
passing array to hidden fields in form on next page? seala ASP 2 09-04-03 03:40 PM
page navigation help grafik ASP 1 07-27-03 03:08 PM
preload an asp page Gurrutello ASP 1 06-24-03 09:12 PM


All times are GMT -5. The time now is 06:41 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.