Thanks in advance.
Any other ways to embed .html or .php in my pages?
Started by Minine, Jun 26 2006 07:27 PM
8 replies to this topic
#1
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.
Thanks in advance.
#2
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
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
Posted 29 June 2006 - 10:27 AM
Ajax is an ideal option as jacorre touched on (using javascript to write data).
#5
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
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
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
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.
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.
#9
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
Hope this helps,
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
