What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » HTML/PHP Advice

HTML/PHP Advice
Author: Message:
albert
Veteran Member
*****

Avatar

Posts: 2247
Reputation: 42
– / Male / Flag
Joined: Feb 2005
O.P. HTML/PHP Advice
For a long time I've been using Iframes to code my websites, and although it does work properly, everyone seems to say that this is no way close to be the best way to put both pages together.

My question is what alternative do you have for it then? I don't want to put the menu on every page, since the menu changes every here and then, so what method should I opt for?

If I remember correctly there's someway to do it with PHP with an include or something.. But I don't know if I'm remembering correctly or if I'm just mixing something with something else..

Thanks for your reply.
04-15-2007 03:13 AM
Profile E-Mail PM Web Find Quote Report
wj
Former Admin
*****

Avatar
I aim to misbehave.

Posts: 2224
Reputation: 52
39 / – / Flag
Joined: Mar 2002
RE: HTML/PHP Advice
You could do it eaisly with this:

<?php
include 'menu.php';
?>

That would add the contents of menu.php where you put that code.

That what you're trying to accomplish?
"A towel is about the most massively useful
thing an interstellar hitchhiker can have."
04-15-2007 03:17 AM
Profile PM Find Quote Report
albert
Veteran Member
*****

Avatar

Posts: 2247
Reputation: 42
– / Male / Flag
Joined: Feb 2005
O.P. RE: HTML/PHP Advice
quote:
Originally posted by wj
You could do it eaisly with this:

<?php
include 'menu.php';
?>

That would add the contents of menu.php where you put that code.

That what you're trying to accomplish?

Yes, but I didn't seem to be able to do this earlier.. I'll try it right away, thanks for the advice.

Question though, will that only put the text, or the design as well?

Yay it worked!

This post was edited on 04-15-2007 at 03:29 AM by albert.
04-15-2007 03:19 AM
Profile E-Mail PM Web Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
35 / Male / Flag
Joined: Oct 2004
RE: HTML/PHP Advice
quote:
Originally posted by alby
Question though, will that only put the text, or the design as well?
It is exactly the same as copying the contents of menu.php to the place where you type the "include 'menu.php'" including any html formatting, php code etc.
04-15-2007 01:47 PM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: HTML/PHP Advice
The "include" function reads the file and adds its contents on the current position in the document. Therefore, make sure you don't have any <html> or <body> tags in the menu.php file. ;)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
04-15-2007 05:06 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On