Date: 03/13/00
- Next message: Bob Strouper: "[PHPLIB] Re: Fw: Sessions: SQL-error, Dublicate entry in active_sessions"
- Previous message: Lauren Daniel Stegman: "[PHPLIB] Authentication of Framesets."
- In reply to: Lauren Daniel Stegman: "[PHPLIB] Authentication of Framesets."
- Next in thread: Michael Anthon: "RE: [PHPLIB] Authentication of Framesets."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi!
Lauren Daniel Stegman skrev:
>
> I have read the previous posts on frameset authentication, but have not yet
> been able to get things working properly on my site.
>
> I need to have the following sort of framset:
>
> ----------------------------------
> | | |
> | Nav | |
> | Bar | MAIN |
> | | |
> | | |
> ----------------------------------
Here's some food for thought: Why don't you use a table-based approach
instead of frames?
The basic approach is this (wrapped in appropriate phplib, html and body tags
of course):
<TABLE>
<TR>
<TD>
<? include("nav.inc"); ?>
</TD>
</TR>
<TR>
<TD>
<? include("content.inc"); ?>
</TD>
</TR>
</TABLE>
Call the page index.php3 (or something).
For example, the nav bar could contain the following links:
<A HREF="index.php3?NodeID=1>Home</A><BR>
<A HREF="index.php3?NodeID=2>Contact</A><BR>
<A HREF="index.php3?NodeID=3>Links</A>
Now you could select what content to show, depending on what link you've
followed in the nav bar. In the simplest case, this could be a switch
statement like:
switch($NodeId) {
case 1: include("front.inc"); break;
case 2: include("contact.inc"); break;
case 3: include("links.inc"); break;
default: break;
}
Ideally, you don't want to code this by hand, you'ld rather want to store
this in a database instead, so that the $NodeID is what you look up in your
database of pages of content to show.
Same goes for the nav bar. You'll probably want to fetch what pages to
show in it from the database of accessible pages as well.
Sorry for getting a bit carried away :-).
One of the main advantages of this method, is that there is only one page,
not multiple, that have to be authenticated. You also have constant control
over the nav bar which can be hard to achieve with frames.
HTH
/Claes
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
- Next message: Bob Strouper: "[PHPLIB] Re: Fw: Sessions: SQL-error, Dublicate entry in active_sessions"
- Previous message: Lauren Daniel Stegman: "[PHPLIB] Authentication of Framesets."
- In reply to: Lauren Daniel Stegman: "[PHPLIB] Authentication of Framesets."
- Next in thread: Michael Anthon: "RE: [PHPLIB] Authentication of Framesets."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

