Re: [PHP] navigation include not functioning

2009-08-06 Thread tedd
At 10:00 AM -0700 8/5/09, Allen McCabe wrote: -snip- If this sounds like something you are familiar with (former issues and whatnot) please let me know what I'm doing wrong. Try this: http://sperling.com/examples/include-demo/ If you follow what's given there, you'll be further along on incl

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Paul M Foster
On Wed, Aug 05, 2009 at 02:55:07PM -0700, Ben Dunlap wrote: > > In my navigation.php include file, I had if ($page = about) echo href > > I changed it to if ($page == about) echo and it suddenly > worked! Imagine > > that... > > Another good case for putting the variable on the right side

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Martin Scotta
Yes, that's a golden rule for a bug free code. The rule shoudl be something like this... Whenever you have a constant value evaluated to a non-constant value put them in the left side of the expression. if( 'constant' == $non_constant ) echo ' variables has that name for anything '; if( fals

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Ben Dunlap
> In my navigation.php include file, I had if ($page = about) echo href > I changed it to if ($page == about) echo and it suddenly worked! Imagine > that... Another good case for putting the variable on the right side of "==": if ("about" == $page) Then if you mis-type "==" as "=", PH

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Allen McCabe
I just wanted to let know I figured out my last issue (last as in, for now). In my navigation.php include file, I had if ($page = about) echo href I changed it to if ($page == about) echo and it suddenly worked! Imagine that... Thanks all for you help, you are celebrities in my book now.

Re: [PHP] navigation include not functioning

2009-08-05 Thread Martin Scotta
You are using a value-filled array as a key-filled. Try this snippet and look the results... $pages = array('about' , 'services', 'portfolio', 'contact'); $page = array_key_exists( 'page', $_GET ) ? $_GET[ 'page' ] : 'about'; /*if*/ false === array_search( $page, $pages, true ) && ( $page

Re: [PHP] navigation include not functioning

2009-08-05 Thread Allen McCabe
Okay, I see how href="?page=contact" would work, and I do indeed have only one file (which loads includes), but it still is not working. Clicking a link, be href=?page=contact, href=?page=services, whatever, it still loads the page with the ?page=whatever attached to the URL, but it is not subsitut

Re: [PHP] navigation include not functioning

2009-08-05 Thread ollisso
On Wed, 05 Aug 2009 20:19:00 +0300, Allen McCabe wrote: Sure. When I load my site, default.php loads ( displaying: http://uplinkdesign.hostzi.com/ in the browser as expected). $thisPage is set to "about" via: in the tags. I am seeing this: The first 2 includes work just fine, loading

Re: [PHP] navigation include not functioning

2009-08-05 Thread Martin Scotta
I think you are looking for something like this: $page = array_key_exists( 'page', $_GET ) ? GET['page'] : 'index'; Then you MUST sanitize the $page variable. I often use the querystring to wrapp the module you are requesting: www.example.org/?path/to/molude (note that .htaccess is required) #

Re: [PHP] navigation include not functioning

2009-08-05 Thread Allen McCabe
Sure. When I load my site, default.php loads ( displaying: http://uplinkdesign.hostzi.com/ in the browser as expected). $thisPage is set to "about" via: in the tags. I am seeing this: The first 2 includes work just fine, loading to proper middle section and proper right-hand-side page conte

Re: [PHP] navigation include not functioning

2009-08-05 Thread Jerry Wilborn
I'm having trouble understanding your description of the problem. Can you tell us what you're seeing and what you expect to see? Jerry Wilborn jerrywilb...@gmail.com On Wed, Aug 5, 2009 at 12:00 PM, Allen McCabe wrote: > I am trying to generate pages by importing content in includes, and using

[PHP] navigation include not functioning

2009-08-05 Thread Allen McCabe
I am trying to generate pages by importing content in includes, and using my navigation include to tell PHP to replace a $thisPage variable which all the includes use The idea behind it (I know tons of people do it, but I'm new to this concept), is to have a 'layout' page where only a variable ch

Re: [PHP] navigation / location bar

2008-09-30 Thread mike
On Tue, Sep 30, 2008 at 1:07 PM, Eric Butera <[EMAIL PROTECTED]> wrote: > Don't forget people share links and find sites through lots of random > ways. It's nice to have such things. Oh yes, I am moreso for the "back to home" style myself. A deep link won't benefit from the "this is how you got

Re: [PHP] navigation / location bar

2008-09-30 Thread Eric Butera
On Tue, Sep 30, 2008 at 3:54 PM, mike <[EMAIL PROTECTED]> wrote: > Also remember there are two styles of breadcrumbs: those which follow you > around the site and create a path of your previous pages (like a true > breadcrumb) or the more standard path-back-to-home hierarchial style. It > doesnt ma

Re: [PHP] navigation / location bar

2008-09-30 Thread mike
Also remember there are two styles of breadcrumbs: those which follow you around the site and create a path of your previous pages (like a true breadcrumb) or the more standard path-back-to-home hierarchial style. It doesnt make much sense to recreate the browsers back button functionality

Re: [PHP] navigation / location bar

2008-09-30 Thread Stut
On 30 Sep 2008, at 18:23, tedd wrote: At 4:27 PM +0100 9/30/08, Stut wrote: As examples check out the following pages (under the orange bar)... http://uk.freeads.net/ Stut: I can understand: Travel >> Holidays Because the user moves to the "Holidays" page from the "Travel" page. In fact,

Re: [PHP] navigation / location bar

2008-09-30 Thread tedd
At 4:27 PM +0100 9/30/08, Stut wrote: As examples check out the following pages (under the orange bar)... http://uk.freeads.net/ Stut: I can understand: Travel >> Holidays Because the user moves to the "Holidays" page from the "Travel" page. In fact, there's no way to get to the "Holidays"

Re: [PHP] navigation / location bar

2008-09-30 Thread Stut
On 30 Sep 2008, at 16:33, Alain Roger wrote: Interesting but how to make this hierarchy ? this i do not know in PHP :-( where can i find code examples ? This depends too much on how your site is structured for me to give a useful answer. As I said in my reply "If your site can't figure out

Re: [PHP] navigation / location bar

2008-09-30 Thread Alain Roger
Interesting but how to make this hierarchy ? this i do not know in PHP :-( where can i find code examples ? On Tue, Sep 30, 2008 at 5:27 PM, Stut <[EMAIL PROTECTED]> wrote: > On 30 Sep 2008, at 16:04, Alain Roger wrote: > >> a lot of web sites propose a locationbar (something like dynamic map sit

Re: [PHP] navigation / location bar

2008-09-30 Thread Stut
On 30 Sep 2008, at 16:04, Alain Roger wrote: a lot of web sites propose a locationbar (something like dynamic map site) to end user when they are browsing the website. usually i looks like that: Home > Products > Software > Operating System > Windows XP User can come back to a previous parent

RE: [PHP] navigation / location bar

2008-09-30 Thread Jay Blanchard
[snip] a lot of web sites propose a locationbar (something like dynamic map site) to end user when they are browsing the website. usually i looks like that: Home > Products > Software > Operating System > Windows XP User can come back to a previous parent node by just clicking on the name, for ex

[PHP] navigation / location bar

2008-09-30 Thread Alain Roger
Hi, a lot of web sites propose a locationbar (something like dynamic map site) to end user when they are browsing the website. usually i looks like that: Home > Products > Software > Operating System > Windows XP User can come back to a previous parent node by just clicking on the name, for exam

Re: [PHP] navigation

2007-01-29 Thread Richard Lynch
On Sat, January 27, 2007 8:42 am, koen wrote: > How to creat the effect of the explorers back and forward buttons in > php? Something like this, except I almost for sure have a one-off error or got the 'push' confused with 'shift' as I always do... $current_page){ $last_page = $history[$curr

Re: [PHP] navigation

2007-01-27 Thread Myron Turner
koen wrote: How to creat the effect of the explorers back and forward buttons in php? It's a javascript issue, using the javascript history object. -- _ Myron Turner http://www.room535.org http://www.bstatzero.org http://www.mturner.org/XML_PullParser/ -- PHP General

RE: [PHP] navigation

2007-01-27 Thread Jay Blanchard
[snip] How to creat the effect of the explorers back and forward buttons in php? [/snip] Since PHP is server side you would have to use Javascript to do this. See http://www.comptechdoc.org/independent/web/cgi/javamanual/javahistory.ht ml -- PHP General Mailing List (http://www.php.net/) To un

[PHP] navigation

2007-01-27 Thread koen
How to creat the effect of the explorers back and forward buttons in php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] navigation question

2003-09-15 Thread Andre
Thanks for your reaction, You are right about your conclusion how I think the code should work. I am indeed trying to run the script off one server (my_domain1) and then attempting to "feed" the function a directory structure off another server (my_domain2). I suppose the function opendir() only

Re: [PHP] navigation question

2003-09-15 Thread Petre Agenbag
The function is correct, BUT, it looks like you are trying to run this script off one server and then attempting to "feed" the function a directory structure off another server. Your code will work "as-is" if you run the script off my_domain2, but it won't work if you run it off my_domain asking f

[PHP] navigation question

2003-09-14 Thread Andre
Hello, For my website I use some PHP code for navigation. Therefore I use a directory structure which contains some navigation files the visitor can open. The directory structure looks like this: my_domain | - /navigation | - file_1.html | - file_2.ht

[PHP] Navigation Problem

2001-04-28 Thread Subhrajyoti Moitra
Hi, i want to make navigation links like the one given below Top->Category1->SubCategory1->SubCategory1 - This lies at the top of every page and indicates which category or subcategory the user is in. These are links. One way of doing it is to drill down

Re: [PHP] Navigation

2001-02-20 Thread Chris Lee
there are numerous posts on the list regarding this subject, I will give some code examples, I hope this helps. \n"; } echo " "; if ($pos_prev >= 0) echo " Back "; echo " Home "; if ( $pos_next < $product_count ) echo " Next "; echo " "; ?> simple, no complica

[PHP] Navigation

2001-02-20 Thread Chris
Hi there, I'm having difficulties, hoping I could get some help.. I have two links, "Next" and "Previous". I want the Next button to load the next image, and previous for previous. I have the links setup like so: http://bla.com/bla.php?image=# where # is a number, starting with 1. I want fo