Jump to content

How do I load a page using a PHP function?


wopopd83

Recommended Posts

I'm a newbie (4 months). I'm doing pretty good, however once in a while I need to do something real simple but can't seem to find the proper function to do it with. I'm simply trying to load a page eg. $active = $Zip_Rows['active'];

 

if ($active==1){

 

what function do I put here to load example1.php

 

}else {

                what function do I put here to load example2.php

}

It's always the simple things that get you!! Thanks for you freaks help!

 

Duh...ok thanks a bunch for this simple resolution, it's common sense; don't know why I couldn't figure that out. Now that I have proved that works just fine, I have another question regarding loading a new page; I'm using 3 frames, how do I target another frame using include(example1.php)?

I'm using 3 frames, how do I target another frame using include(example1.php)?

 

What are you trying to achieve? You want to (re)load a page in one frame, during which another frame's content is changed via a PHP include? You can't do that. I *guess* you could reload the page that defines the frameset with some parameters passed in the URL, but that's pretty messy (plus it requires all the frames to be re-loaded). Alternatively, you could use some javascript. Maybe if you explain what it is you're trying to do, we could suggest a better method.

Actually, my correction, it's more of a HTML thing I think...sorry. I had to go back and review what I was doing from last week. Basically I'm using a form in frame2 and on submit I load 3 calendars in frame3. At the same time I want to load a new page in frame2. But now that I look at it closer, I think your right; I need to use JSript "onclick" to load the new page in frame2. Anyway, sorry for wasting your time...next time I'll look deeper into what I'm doing before I post!

Anyway, sorry for wasting your time...next time I'll look deeper into what I'm doing before I post!

 

Sometimes it helps to have a push in the right direction, though! Yes, you do need to use javascript, PHP can't really fiddle around with existing frames since they're stateless client side.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.