Click to See Complete Forum and Search --> : How do I do this. Do I use frames?


Barnie
02-27-2007, 03:53 PM
Hey all.

I'm kind of unsure how to do this. The page I have is located here - http://www.edmontongolf.com/fgl.php and I'm trying to get another website to display in a frame (unless there is a better way to do it?) in the middle of my page. Any ideas how I would go about doing this?

Thanks

aj_nsc
02-27-2007, 04:12 PM
You've got a nice looking layout here, please don't mess it up with frames.

Put your content in another file (say content.php) and include it in this file where you want it to be displayed - i.e. put the following code where you want your content to show up


<?php include('content.php'); ?>


Do make a dynamic website, you could have the page call different content files according to a variable passed in the url using something like this

URL = http://www.edmontongolf.com/fgl.php?p=contact

and the following code


if(isset($_GET['p'])) {
$file = $_GET['p'].".php";
include($file);
}
else {
//display an index page
include('index.php');
}

Barnie
02-27-2007, 04:24 PM
Thanks for the compliment. I don't want to use frames I just didn't think I had any choice for what I want to do.

Can I still accomplish what you said if I'm trying to bring in another page from a website so that website displays in the middle of my page? I'd like my users to be able to browse the other site while still accessing my page.

The reason I need to do this is I'm setting up a Fantasy Golf League for my users with the help of an external site (which provides the actual fantasy golf league).

Here is the page I want displayed in the middle of my page: http://www.fglweb.com/fglpool01.php?ifid=349 The header on this page will of course have to be shrunk of course.

aj_nsc
02-27-2007, 04:48 PM
I think you theoretically can, but when I tried to do it on my local server, I got an error saying the server configuration would not allow me to include a URL (I was only allowed to include a file that is on the machine that it is being called from). You can probably enable the ability to include a URL....but....well, this is as far as I go, someone else can jump in here, and good luck to you Barnie :D

Barnie
02-27-2007, 04:59 PM
Haha thansk for the help aj_nsc. Perhaps I'm in the wrong section for this. Maybe I'll post this link in the PHP section seeing that it is much more confusing than I at first thought. :D

Barnie
02-27-2007, 05:03 PM
Discussion has been moved over to the PHP section:

http://www.webdeveloper.com/forum/showthread.php?p=720741#post720741