473,503 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

organizing my website

2 New Member
Hello,
i am looking for a Php script which could help me in organising my website.

Ok the problem ...

i have created index.html and made full layout in it. I use iframe in a table to view the pages which are navigated on the index.html..i hope u understand..its just like a index.html has all the links and those links open in that iframe page..

now i create a page ..contactus.html and only put the contact numbers in this page.

now the link to this page is on index.html nagivation menu... obviously when somebody will click contactus link which will be targetted to the iframe the page will open in the frame.i hope u get it till here..

the problem is that when somebody will open www.website.com/contactus.html only this page will open...we won't be able to see the layout which is in index.html...

i cannot avoid frames because whenever i will have to update the layout i will have to update all the pages..and neither i can use css layouts because i am not mastered in CSS Layouts..i dnt know much abt them and have done alot of research on them using google but still cannot produce good layouts..

on many sites i have seen PHP Include type on command..the orignal page contains just small info but when u open like... www.website.com/contactus.php it will open with the layout which is on index.php.. the navigation links are like are like ..contactus.php/?include/news something..blah blah..there is something like that..i want to know step by step how can i do this in php..

i want a create seperate pages with proper titles and meta tags but it should open in a table with proper layout page..no matter from where you open it and the page title should change with it.....

remember i am going to use the same index.php layout page for multi pages, like contact.php about.php all should open with index.php..


Please let me know how can we do this in PHP..
any help would be appreciated
Apr 5 '07 #1
1 1376
michaelb
534 Recognized Expert Contributor
First of all, please read the Posting Guidelines and avoid using meaningless titles like "Help required" in your future posts.

As for your question, I think there are two ways to force a page into a frameset.

In your server PHP code look at $_SERVER['HTTP_REFERER'] and compare it to the url of the frameset.
Then use the header function, if necessary to reload page in the frame.

The same effect can be achieved on the client side using a small javascript code, which you can put in the HEAD section of each page that must be displayed in the frame.
Here are some crude code samples to illustrate the idea.

Expand|Select|Wrap|Line Numbers
  1. <script language="javascript" type="text/javascript">
  2. // 1
  3. if (top.location == location) {
  4.     // window is loaded directly
  5.      window.location.href = frameset.html;
  6. }
  7.  
  8. // 2
  9. if (self == top) {
  10.     // window has no parent, loaded directly
  11.      window.location.href = frameset.html;
  12. }
  13.  
  14. // 3
  15. if (top.location != my_frameset_url) {
  16.     // reload in the frameset 
  17.      top.location.href = my_frameset_url;
  18. }
  19. </script>
  20.  
You may need to refine this code a bit, folks in the Javascript forum can help you to make it perfect.
Apr 6 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
1706
by: ToMeK | last post by:
hi! i'm trying to builid web catalog and i'm having problems with organizing my tables. here's what i want: i have main categories, sub_categories and articles like this: CATEGORY_1 SUB_CAT_1...
1
1965
by: Donald Firesmith | last post by:
We are converting the OPEN Process Framework Repository (www.donald-firesmith.com) of over 1,100 free open source reusable process components for building development methods for...
3
4315
by: Jamie | last post by:
Hi, Thanks for the excellent answer to my last question! One more: Does anyone have a method they follow for organizing stylesheets themselves? They seem like they can get bloated and hard to...
10
3227
by: Rada Chirkova | last post by:
Hi, at NC State University, my students and I are working on a project called "self-organizing databases," please see description below. I would like to use an open-source database system for...
6
1237
by: Dean | last post by:
I have several ASP.NET applications that I want to put onto a new website. Each app is currently its own solutions with it's own global.asax, etc.. What is the right way to deploy multiple...
6
1646
by: Don Wash | last post by:
Hi All! I'm developing ASP.NET pages using VB.NET language. My background is VB6 and ASP3. Right now, I'm evaluating strategies on creating reusable and common functions and methods for ASP.NET....
2
1988
by: Hallvard B Furuseth | last post by:
Are there any guidelines or conventions for how to organize the preferred and alternate style sheets for a site, sheets for different media, and what titles to give them in the <link...
3
1585
by: Tarscher | last post by:
Hi all, I 'm building a website that provide services for soccer teams. When a user (team) signs up I want to give him some personal space like http://www.soccerteamonline.com/teamname where...
1
2537
by: Ushach | last post by:
hi, I want to know about Self Organizing maps.T ounderstand the concept ,I need a small example which explains how clustering is done through self organizing maps?If any body implemented it plz...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.