PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old April 28th, 2002, 01:52 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Dynamic Framesets

Hi all,

I have what I think it probably quite an easy problem, but I am a complete newbie to php.
I am looking to create a dynamic framset, where the varios pages of the frameet are defined by the requesting url.
What I have done so far is this:
The URL - http://..../frameset.php?menu=menu1&main=page1.html

Then in the framseset:
<frame src="$main">
<frame src="&menu">

This works fine, but it does mean I have to type in all thge exact urls to the pages, which leaves it open to spelling and typing mistakes. What I want to be able to do is something like:
The URL - http://..../frameset.php?menu=1&main=3

Then in the head of the framseset doc, specify which page each number relates to:
1 = menu1.html
2= page1.html
3= page3.html

and so on....

So I would be left with a list of all the pages in my site in the head of my framset and the numbers in the URL will decide which is displayed.
I will also need to add something that will show the default page if nothing is secifed in the url or if an invalid number is entered.

Can anyone help please?
Many thanks!
Mark
mark@markdw.com

Reply With Quote
  #2  
Old April 28th, 2002, 08:55 PM
sethadam1 sethadam1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Orlando, FL
Posts: 223 sethadam1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Dynamic Framesets

here's what I'd do. Create a new page called, for example, "menudir.php." Contests as follows:
<?php
$frame[1] = "menu.php";
$frame[2] = "home.php";
$frame[3] = "links.php";
$frame[4] = "contact.php";
etc etc etc
?>

then in each page, simply put
<?php include ('menudir.php'); ?>

now your URL is as follows:

http://yoursite.com/frameset.php?menu=1&main=2

and the contents is:

<FRAMESET ROWS="10%, 90%" FRAMEBORDER=NO FRAMESPACING=0 MARGINWIDTH=0>
<FRAME name="menu" SRC="<?=$frame[$menu];?>" FRAMEBORDER=NO FRAMESPACING=0 MARGINWIDTH=0 TARGET=MAIN NORESIZE>
<FRAME name="main" SRC="<?=$frame[$main];?>" FRAMEBORDER=NO FRAMESPACING=0 MARGINWIDTH=0 NORESIZE>
</FRAMESET>

As you can see, it wil populate it for you. This is one of MANY ways to do it....

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Dynamic Framesets


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway