Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001092

Re: [PHP] preventing an include() from taking over? From: LRW (liam <email protected>)
Date: 09/19/01

Unfortunately I just started teaching myself PHP like last weekend, and so
far I only have include() and require() down pat. =)
What in the php.net Manual is the concept of default function called? I see
URL's all the time that end in something like index.php?pg=1 and I was
hoping to learn what that is and why.
If you could point me to the name of that concept, I'll chow down on
self-teaching. =)
Thanks!
Liam

"Rick Gardner" <webphp <email protected>> wrote in message
news:200109191941.PAA15614 <email protected>
> Liam,
> Assuming that you control the content that you are going to be feeding
> into your column 1, I would set your page up such that it accepted a
> variable passed in as part of the index.php url.
> I would then establish separate files on the server for anything that
> you would want as a choice of coming up in column1.
> So the javascript function might be the default function, we'll call it
> "def". You might have a few other choices that the user could choose
> "choice1", "choice2", and "choice3" (these would be the data that the
> user is requesting, and that you want to appear in column1).
> Then I would modify the javascript such that it directs the user to
> "index.php?pg=choice1" if the user clicks on choice1.
> Then I would modify the index.php page such that if no valid value is
> passed in for $pg, it does an include("def");
> However, if a valid value is passed into $pg, you would just do
> include($pg);
>
> Sorry for the poor explanation, does this help though?
> Rick
>
> On Wednesday, September 19, 2001, at 03:43 PM, LRW wrote:
>
> > I've got a complicated little thing going on here.
> > I have page INDEX.HTM with a 2 column table.
> > I want the entire page to remain the same, except column 1. In column
> > 1 I
> > have an include() which contains a javascript scrolling menu where on
> > click
> > of an option it calls up the selected page.
> > As it is, when it calls up that page, it replaces the whole of INDEX.HTM
> > with that page.
> >
> > This may be more of an HTML question and not PHP, but is there a way to
> > get
> > the resulting page from the scrolling menu to stay within the table
> > column
> > that contains the include()?
> >
> > Thanks for any suggestions!
> >
> > Liam
> > liam @ celticbear . com
> >

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>