Jump to content


Any other ways to embed .html or .php in my pages?


8 replies to this topic

#1 Minine

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 26 June 2006 - 07:27 PM

The title speaks for itself. I know I can include text, images and links using php include, however, I'm curious to know whether there are any other ways of doing that. For some reason I don't like too many 'p's. :)

Thanks in advance.

#2 Jacorre

    P2L Jedi

  • Members
  • PipPipPip
  • 824 posts
  • Gender:Male
  • Location:USA
  • Interests:Computers, Technology, Internet, Graphic/Web Design, Music, Soccer

Posted 26 June 2006 - 11:17 PM

You can use iframes, but I don't think they work well across browsers. Guess you could also use javascript to write content into the specific area you define.

#3 NinJA999

    Young Padawan

  • Members
  • Pip
  • 23 posts

Posted 29 June 2006 - 12:17 AM

Personally, I think iframes would be the best choice, but as Jacorre said, they don't work on *all* browsers (though on my site they work on the major 2: IE and FF).

#4 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 29 June 2006 - 10:27 AM

Ajax is an ideal option as jacorre touched on (using javascript to write data).

#5 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 29 June 2006 - 12:17 PM

The catch is, a lot of people disable JS, thus disabling AJAX. Frames are less problematic, so more people will use those. Personally, i'd stick with php though.

#6 NinJA999

    Young Padawan

  • Members
  • Pip
  • 23 posts

Posted 29 June 2006 - 12:37 PM

A lot of people think frames are annoying. That's why "iframes" are so good. They are like a window in the page, so they scroll with the page. But PHP includes are a good way.

#7 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 29 June 2006 - 01:00 PM

I cant stand iframes or frames full stop....Dunno about anyone else...They really are redundant to modern designing.

#8 Danny

    Young Padawan

  • Members
  • Pip
  • 262 posts
  • Location:London
  • Interests:web design

Posted 29 June 2006 - 04:41 PM

frames if used correctly can easily go un noticed.


Just use <? include php... ... i have several of these placed on one of my pages, it loads extremely fast and works perfectly in all browsers. :P

#9 Lang

    Young Padawan

  • Members
  • Pip
  • 198 posts
  • Gender:Male
  • Location:Ontario, Canada

Posted 30 June 2006 - 10:11 AM

Hey!

My broach on the subject is having lots of pages, I find, if organized is an advantage. But because you don't like many pages, you could make on page that has an if statement telling what to put then include that in your index and you've only got two pages.

Example
<?
//portal page
if (isset($_GET['action'])){
   $action = $_GET['action'];
}else{
   $action = 'home';
}
if ($action == "home"){
   echo 'Welcome to the homepage';
}
else if ($action == "contact"){
   echo 'Welcome to the contact page';
}
?>

<HTML>
<?
//index page
include('portal.php');
?>

Hope this helps,





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users