Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Dynamic Navigation Menu


I need to build a dynamic menu that will include certain links depending on what variables are in the URL. This is doable - right?

For example: catalog.php?product=widget&color=green

Menu would look like:

Green Widgets
Brand 1 Green Widget
Brand 2 Green Widget
Brand 3 Green Widget
etc.

Any help would be greatly appreciated!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Dynamic Navigation
I am trying to construct a dynamic navigation that expands when a visitor selects a sub-directory. The site has 6 sub-directories, plus the root. Is there a way to use a wildcard or something, to indicate all contents of a directory?

For example (this does not work):

<?if($_SERVER['PHP_SELF']=="/cars/*"){?>

Anyone know of a solution? What about the root level, is there an option for that too?

Dynamic Menu CSS
I am trying for a long time now, to find a way of creating a dynamic drop
down menu. I have the CSS part ready and working and also I have the first
level of the menu working.
the problem I have is how can I submit the id from the first level menu in
order to make the query and create the second level and so on menu.

I am trying to avoid Javascript but I can't see another way at the moment...
What I want to achieve is to produce the menu on HOVER if that is not
possible on click will be ok as well.
Do any of you have an idea ?

This is the code I have :
**********************************************
<div id="menu">
<ul>
<li><h2>Products</h2>
<ul>
<?php do { ?>
<li><a href="?cat_id=<?php echo
($row_product_categories['prod_category_id']); ?>"title="<?php echo
strtoupper($row_product_categories['prod_category_name']); ?>"><?php echo
ucfirst($row_product_categories['prod_category_name']); ?></a></li>
<?php }
while ($row_product_categories =
mysql_fetch_assoc($rs_product_categories)); ?>
<ul>

<?php do { ?>
<li><a href="index.php?id=<?php echo ($row_products['prod_id']);
?>"title="<?php echo strtoupper($row_products['prod_name']); ?>"><?php echo
ucfirst($row_products['prod_name']); ?></a></li>
<?php }
while ($row_products = mysql_fetch_assoc($rs_products)); ?>

</ul>
</li>
</ul>
</li>
</ul>
</div>
**************************************************

Mysql Php Dynamic Menu
I am trying to write a script that will create dynamically a menu from MySQL
database. The database table is a product categories table and it has the folowing filed:

category_id, parent_category_id, category_name (some other fileds are there
as well but these are enough to figure out the logic)

I know that I have to store all the product_categories records in a temp
array and then some how go through them and store the level of each record
in the menu....

If you have done something like that I suppose you know what I mean and I
would much appreciate to give me a hint here ...
I had a look in the phpLayersMenu from sourceforge but it is really advanced
OO code and I cannot understand the logic....

My target is to create a Tree menu with no pre - defined number of
records...

Dynamic Select Menu
I am trying to populate a select menu with data from a mysql db. I get the select menu, but no content or errors. The two fields are id and websites. Here is the code:

Dynamic Drop Down Menu
I'm having difficulties displaying the MakeModelID for a row selected from a drop down menu I've populated from a table combining three attributes (Make, Model and Specification - for example Ford Transit LWB 350 HR). What I require is to capture in a variable, such as $MakeModelID, the ID for that record selected. Code:

Creating Dynamic Drop Down Menu
I have a mysql database called Auditions with a table called Sept7. The table has two columns Time and Name. I want to create a dynamic pull down menu and populate it with items pulled from the table based on a query. Code:

Dynamic MySQL Nav Menu Sorting
I have this dynamic menu and I want to change the order of the menu items...
I added a column in the database wich has an integer value for ordering the
menuitems.
But the only way is by hardcoding them into the database.

I would like a way to sort them with drag-and-drop or with up/down arrows.

Do you think that except PHP & MYsql I will need Javascript as well ?
Any ideas how to do that ?

Dynamic Message Board Menu
Here's an issue I've spent the last 8 hours trying to get my head around, I'm pretty sure the answer is simple enough, but I just cannot work it out, any help would be much appreciated...even just a function name or something...

I have a very simple message board setup. The browse menu will look end up like below, all dynamically fed from a database, which is currently setup as:

[articleID] [articleDate] [articleText]
      23      2007-07-18  Lorem ipsum dolor....

The 'articleDate' field is a DATE type, formatted yyyy-mm-dd. All posts should be sorted ascending, latest first. I want nothing to be hard coded, so there could be 2 posts in any month, or 200, or there could be no posts in any year.

2007
June
 - #1
 - #2
August
 -#1
September
 -#1
 -#2

2008
January
 -#1
.
.
.
.
.
So on and so on.

So far, I've toyed with array_unique(), as well as multi-dimensional arrays, but I'm really not sure if this is the right approach. I'd post code but I'm not sure there's any point, what I'm really looking to find out is the method to use, rather than code snippets, so if anyone has achieved this, how did you do it?  I'm happy as to teach myself whatever I need to know, problem is I don't know what I need to know...

Dynamic Menu Bar In A Frame - Controlling Frames In Php?
I have been using in a lot of websites a script that creates a menu bar but
avoids that the button to the current page can be clicked.
I am rather satisfied with it (although suggestions for better ways of doing
things are welcome, the script follows below FYI)
No there is a a problem that for a new site (www.orkestbasic.nl/nieuw) the
menu with the links has to be placed in a separate frame because the right
part of the page must be scrollable. So the check wether a button has to be
a link or not cannot be done anymore with checking PHP_SELF as I am used to
do.
I am thinking of making all the links to something like <a href =
"main.php?content=songlist">
then main.php would be a frameset with something like <frame name =
"content" src = "<?php echo "$content.php"?>">
In the left frame I could do a similar thing with a small modification to
the createlink function (see below) I often use.
But I would like to know if there are more elegant suggestions for it. Could
not find really good tips on google. Thanks for any help

FYI This is the function I have been using until now.

function mvwMaakLink($omschrijving, $verwijzing, $separator = "",
$aHrefClass = "", $noHrefClass = "")
{
$locatie = $_SERVER['PHP_SELF'];
//link to the current page, no need for clicking on
it
//echo $locatie;
if (strstr($locatie, $omschrijving))
{
$beginTag = "";
$slotTag = "";
if ($noHrefClass != "")
{
$beginTag = "<span class = "$noHrefClass">";
$slotTag = "</span>";
}
echo "$beginTag$verwijzing$slotTag";
}
else
{
$beginTag = "<a ";
if ($aHrefClass != "")
{
$beginTag .= "class = "$aHrefClass" ";
}
$beginTag .= "href = "$omschrijving">";
echo("$beginTag$verwijzing</a>$separator");
}
}

Unexpected Order On Dynamic Select Menu
I've got a directory called 'potm' (picture of the month) that contains:

02.jpg
03.jpg
04.jpg

I'm dynamically constructing an 'archive' select menu that contains all the available pics. For some reason the select menu reads:

April
February
March

I've tried to sort the array, but it made no difference. PHP Code:

[PEAR:QuickForm] Dynamically Change A Dropdown Menu According To Another Menu?
I've been using QuickForm for a few months now and I am now given a
new challenge:

I've got a search form with a dozen of dropdown menus, the first
dropdown menu being "Brand". If you select either Brand A, B, C, D...
Z, the second dropdown menu "Model" must be dynamically changed to
model AA, AB, AC, AD..., according to the models manufactured by the
brand selected in the first box.

I've seen that done on quite a few sites, but never found if QuickForm
had a quick & clean way of doing that.

Navigation Problem And PHP
Problem: I'm trying to get a navigation path/string similar to devshed or zdnet.
=================================================
Example:
"you are here: home / news / archives / article"
With each in turn being a link and the last being the title.
=================================================
I have a small file in the directory
/news/archives/ that takes an include file and populates page from mySQL.

A function is called (getNavPath) that looks to see where the file is and prints a navaigation structure back up the tree.

A snippet of the code I've done so far:
=================================================
<PRE>
//passed in the doc title
function getNavPath($navtitle)
{
$path = getenv("REQUEST_URI");

$dir=dirname($path);

$dir_array=explode("/", $dir); // split the string by forward slash (directory delimiter)

/*
note:
the array will now have an empty string as its first element because every
file is at least under root ("/").
So we'll shift it by 1 to get rid of this empty string
*/

array_shift($dir_array);

$arraylength=count($dir_array); //length of the array


/* if the first element is set, i.e. we're not directly under root and can proceed*/

if(isset($dir_array[0]))
{
echo("<a href="/">home</a> / "); //prints home with a link back to home


for($i=0;$i<$arraylength;$i++)
{
$dir_path.="$dir_array[$i]/";

echo("<a href="/$dir_path"."index.php">$dir_array[$i]</a> / ");

}

echo("$navtitle");

}//end if isset..

else
{
//print the title
echo("$navtitle");

}
}// end getNavPath


</PRE>
=================================================

The problem is that when I type the URL without the specific filename e.g. www.domain.com/news/archives/ it doesn't seem to work (although the index.php file is printed okay).

Also if I do type in the full dir1/dir2/dir3/index.php, then dir3 will point to the current page, but I can sort this out.


Can anyone help? Am I going about it the right way?

PHP Navigation With Templates
I want to create a site navigation system that has URL's like this:

/index.php?page=1, /index.php?page=2, and /index.php?page=3.

Using PHP In Navigation Crumb
I'm pretty new to the world of PHP and need a little assistance. I've got a static site at the moment, but I'd like to make it a little easier to maintain and update.

One of the areas I think PHP will really help is with the navigation crumb. Rather than typing in all the information such as 'Home > Category > Article' ... what could I use?

I'd like PHP to just insert the Home URL, followed by the category name and URL, follwed by the article title.

Controlling Navigation With PHP
I got a set of pages which must be navigated in a strict manner. Let's
just say the pages are named A, B, C, and so on. I got no problem with
forward navigation, but I want to disable the client browser's back
button. More specifically, if the user is currently at page D, the
back button doesn't bring the user to page C, but page A instead
(assuming consecutive navigation, from A to B to C and so on).

How can I achieve this with PHP, assuming both the server and the
client are behind strict firewall (both referer and cookies disabled),
and use of client-side javascript are avoided as much as possible (or
even considered disabled as well, either by the firewall or the
browser's setting)?

Navigation <previous 1 2 3 4 5 Next>
Please any help me to providde me the code for
navigation <previous 1 2 3 4 5 next> shows top or
end of the query result from mysql in php pages.

Dir Navigation With Php Ftp Functions
I'm having trouble navigating my directory structure using php's ftp
functions (such as ftp_chdir and ftp_cdup.) I'm writing a program that
allows a user to easily create robot.txt files and upload them to
their server. They should be able to log in to their server using ftp
and browse their directory structure, specifying which robots to allow
into each directory.

When the user logs into their server, they are presented with a list
of directories displayed as links. Clicking a directories link will
take them into that directory and will present them with the
sub-directories contained in that directory. I have the program
running at

Each time is link is clicked, the page is refreshed and ftp_connect
called, meaning that the user is logged back in to their root
directory. I have a stack containing the directories that have been
navigated, so that the program can direct the user to the drectory
they intend to be in.

This seems overly complicated. Is it possible to do what I am trying
to do just using php's ftp functions, without storing a session
variable containing all the directories that have been navigated? Is
is possible to not have to re-login to the root directory every time a
page that uses ftp functions is called?

The solution I have seems to work well and handles symbolic links, but
has the drawback that I can't navigate above the directory that the
user originally logs into. It also just doesn't seem like the correct
way to do this. I'm sure there is a simpler, more proper way.

<?php

include 'include.php'
session_start();

//If $_POST variables are set then we are logging in for the first
time and set $_SESSION variables accordingly
if (isset($_POST['server'])) {
$post = clean_post($_POST);
$_SESSION['ftp_server'] = $post['server'];
$_SESSION['ftp_username'] = $post['username'];
$_SESSION['ftp_password'] = $post['password'];
//Create a stack/array which holds the name of the directories we
have traversed
$_SESSION['directories'] = Array();
}

//if we are not connected to a server then redirect to the login page
if (!isset($_SESSION['ftp_server'])) {
header("Location: login.php");
exit;
}

//If $_GET variables are set then we are actively navigating the
directory structure
if (isset($_GET['dir'])) {
$get = clean_get($_GET);
$ftp_dir = $get['dir'];
}

// set up a connection or die
$conn_id = ftp_connect($_SESSION['ftp_server']) or die("Couldn't
connect to " . $_SESSION['ftp_server'] . "<br>");

// try to login
if (@ftp_login($conn_id, $_SESSION['ftp_username'],
$_SESSION['ftp_password'])) {
echo "Connected as " . $_SESSION['ftp_username'] . "@" .
$_SESSION['ftp_server'] . "<br>";
$_SESSION['username'] = $_SESSION['ftp_username'];
} else {
echo "Couldn't connect as " . $_SESSION['ftp_username'] . "<br>";
}

// turn passive mode on
ftp_pasv($conn_id, true);

//If we are navigating the directoty structure
if (isset($ftp_dir)) {
//if we are navigating to the parent directory pop the name of the
current directory off the stack
if($_GET['act'] == 'cdup') {
array_pop($_SESSION['directories']);
}
//otherwise we are navigating to a child directory
else {
//grab the name of the current directory and push it on the
$_SESSION['directories'] stack
$pieces = explode("/", $ftp_dir);
$relative_path_dir = array_pop($pieces);
array_push($_SESSION['directories'], $relative_path_dir);
}
//Since the stateless nature of http forces us to always login to
the root directory
//we use the $_SESSION['directories'] stack/array to navigate to
child directory we are trying to access
foreach($_SESSION['directories'] as $rel_dir) {
if (ftp_chdir($conn_id, $rel_dir)) {
//do nothing for now
} else {
echo "Couldn't change directory
";
}
}
//we are in the child directory, so display the path
echo "Current directory is now: " . ftp_pwd($conn_id) . "
";
}
else {
//we are in the root directory, so display the path
echo "Current directory is now: " . ftp_pwd($conn_id) . "
";
}

function create_dir_tree() {
global $conn_id;
$files = ftp_nlist($conn_id, ""); //get files in directory
if(is_array($files)) {
//display a link to the parent directory
echo "<br /><a href=index.php?&act=cdup&dir=" . ftp_pwd($conn_id)
.. ">parent directory</a>";
foreach ($files as $file) {
$isfile = ftp_size($conn_id, $file);
if($isfile == "-1") { //Is it a directory? (as opposed to a file)
//display a link to each child directory
$string = "<br /><a href=index.php?&dir=" . ftp_pwd($conn_id) .
"/" . $file . ">" . $file . "</a>";
//replace any double slashes with single slashes
$url = preg_replace("////", "/", $string);
print $url;
}
}
}
else echo "<br /><a href=index.php?&act=cdup&dir=" .
ftp_pwd($conn_id) . ">parent directory</a>";
}
?>
<html>
<head></head>
<body>
<table border="1" cellSpacing="3" cellPadding="3" width="100%">
<tr>
<td>
<?php create_dir_tree(); ?>
</td>
<td>
<form method="post" action="create_text.php">
<table border="1" cellSpacing="3" cellPadding="3" width="100%">
<tr>
<td>
<ul>
<li><input type="checkbox" id="all" name="all">* (all
spiders)</input></li>
<li><input type="checkbox" id="googlebot"
name="googlebot">googlebot</input></li>
<li><input type="checkbox" id="askjeeves"
name="askjeeves">askjeeves</input></li>
<li><input type="checkbox" id="slurp" name="slurp">inktomi
slurp</input></li>
<li><input type="checkbox" id="scooter"
name="scooter">altavista scooter</input></li>
<input type="hidden" name="path" value="<?php echo
ftp_pwd($conn_id) ?>"></input>
</ul>
</td>
</tr>
<tr>
<td align="center">
<input type="submit" value="Submit"></input>
<input type="hidden" name="activity"
value="logging_in"></input>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>

<?php
// close the connection
ftp_close($conn_id);
?>

Css List Navigation
I found a nice link about CSS liquid layout. Specially for css list navigation ....

Navigation In First Application
I've writing my first php application and it's killing me. I've been
programming desktop stuff since the early &#3980;s but this is way
different; php, html, css, and (god forbid) JaveScript all interacting.

I figured out the session management (I think) and can log a user in
and display a <table> with links <a> for the user to select the next
action. What I would like is for the href to specify a php function
and pass parameters to the function. Something like this would be
cool but doesn't work.

<a
href="do_some_stuff($menu_data[menu].pid)">{$menu_data[menu].pname1}</a>

I understand that the href thing can contain a URI or
href="do_some_stuff.php", but how do you create a page where the user
can select an option and have it call a function based on the selection?

I'm using php5, smart, & Firebird.

Navigation Sidebar
I have seen on numerous websites a navigation sidebar, where you click a
link which expands and shows related links underneath as in
- Main Topic 1
Subtopic
Subtopic
+ Main Topic 2
+ Main Topic 3
Is this sort of thing possible in PHP? I am quite new to web programming but
would like to be able to include something like this in a site I am
creating. Using PHP 4, MySQl 5 and Apache 2

Site Navigation With PHP
How do most of you handle the navigation of your site? I ask because I am trying to get my navigation bar to change after the user has logged in.

RecordSet Navigation
Ive created a recordset and the records are displayed logically down the page.

Thing is I only want to display 10 records at a time to stop the page going on for ages as its filed with hundreds of records. In addition a need a: First, Last, Next & Previous hyperlinks that will enable the user to navigate these records. Code:

Form Navigation
Ive cant figure out how to use my previous and next buttons on my form i am using. I have a select query which takes information from 1 record and puts into variables and displays it in the textfields on my form.  Which is working fine. Im not sure how to go about when i click next its got to find the next record and reload my page wif new information. And the same for previous.

Record Navigation Problem
I am using Ultradev and PHP Phakt extension Need to show Search Results in Detail page from Form with 2 fields and "Post".

SQL query

SELECT *
FROM psale
WHERE name LIKE '%MMColParam%' and prewhat LIKE '%MMColParam2%'
$HTTP_POST_VARS["prewhat"]

Problem: Only the first detail page gives the right results. Navigating to other more results using record navigation bar is mixing up the results. Only first detail page is showing the right query results.

Php Webcomic Navigation Script
i am wondering if someone can help me code something relatively
simple for navigating through a linear series of php pages. my code is
halfway done, and is basically functional, but i would like to add
something to it. the code right now can find what page you are on, the
next page, and the previous page. here is how it currently reads:

<? //to get filename $p = $_SERVER["SCRIPT_NAME"]; $parts =
Explode('/', $p); $p = $parts[count($parts) - 1]; //get filename
$c = strtok($p,"."); //get number string

$nc = $c+1; //next comic $pc = $c-1; //previous comic

$ncf = "$nc.php"; $pcf = "$pc.php";

if (file_exists($ncf)) { echo "<a href="$ncf">go to the next
page</a>"; } else { echo "<a href="0.php">go to the first
page</a>"; } ?> <br /> <?

if (file_exists($pcf)) { echo "<a href="$pcf">go to the
previous page</a>"; } else { echo "<a href="2.php">go to
the latest page</a>"; } ?>

what i do if you are on the last page, a link to the first page would
show, and this is not a problem since 0.php can be hardcoded.

my problem, however, is in navigating the pages in decreasing order. is
there any way to look at the current directory and get the token of
only the php pages? i know that i can use the max() function to get the
greatest one listed, but i do not know how to list the files to use the
max() function.

Webcomic Navigation Php Script
i am wondering if someone can help me code something relatively
simple for navigating through a linear series of php pages. my code is
halfway done, and is basically functional, but i would like to add
something to it. the code right now can find what page you are on, the
next page, and the previous page. here is how it currently reads:

<? //to get filename
$p = $_SERVER["SCRIPT_NAME"];
$parts = Explode('/', $p);
$p = $parts[count($parts) - 1]; //get filename
$c = strtok($p,"."); //get number string

$nc = $c+1; //next comic
$pc = $c-1; //previous comic

$ncf = "$nc.php"; //next comic filename
$pcf = "$pc.php"; //previous comic filename

if (file_exists($ncf)) {
echo "<a href="$ncf">go to the next page</a>";
}
else {
echo "<a href="0.php">go to the first page</a>";
}
?>
<br />
<?
if (file_exists($pcf)) {
echo "<a href="$pcf">go to the previous page</a>";
}
else {
echo "<a href="2.php">go to the latest page</a>";
}
?>

what i do if you are on the last page, a link to the first page would
show, and this is not a problem since 0.php can be hardcoded.

my problem, however, is in navigating the pages in decreasing order. is
there any way to look at the current directory and get the token of
only the php pages? i know that i can use the max() function to get the
greatest one listed, but i do not know how to list the files to use the
max() function.

Navigation Of Photos After A Search
I have recently developed a page to display photos after a search of a Mysql database - this works fine. The next stage is to click on any of the results (photo) and this will take you to a new page displaying the photo but in a larger format.

I have tried to use the url parameters but I dont understand how to use them in the new page to link the picked photo in the search page. I use Apache/Mysql/PHP, however a a newbie I use DMX to view the page and source code.

Bread Crumb Navigation
I can't get my bread crumb navigation to function properly. At the moment it produces the correct "Home" link and the current position within the bread crumb but not the information (links) inbetween. Any ideas? PHP Code:

Php Includes For Site Navigation
Ive been hounding google for the past two days looking for a tutorial on how to use php includes for site navigation. Ive found one that does the job, but it can only work with register_globals ON: ....

Php Script For Webcomic Navigation
i am wondering if someone can help me code something relatively
simple for navigating through a linear series of php pages. my code is
halfway done, and is basically functional, but i would like to add
something to it. the code right now can find what page you are on, the
next page, and the previous page. here is how it currently reads:

<? //to get filename $p = $_SERVER["SCRIPT_NAME"]; $parts =
Explode('/', $p); $p = $parts[count($parts) - 1]; //get filename
$c = strtok($p,"."); //get number string

$nc = $c+1; //next comic $pc = $c-1; //previous comic

$ncf = "$nc.php"; $pcf = "$pc.php";

if (file_exists($ncf)) { echo "<a href="$ncf">go to the next
page</a>"; } else { echo "<a href="0.php">go to the first
page</a>"; } ?> <br /> <?

if (file_exists($pcf)) { echo "<a href="$pcf">go to the
previous page</a>"; } else { echo "<a href="2.php">go to
the latest page</a>"; } ?>

what i do if you are on the last page, a link to the first page would
show, and this is not a problem since 0.php can be hardcoded.

my problem, however, is in navigating the pages in decreasing order. is
there any way to look at the current directory and get the token of
only the php pages? i know that i can use the max() function to get the
greatest one listed, but i do not know how to list the files to use the
max() function.

Multilevel Site Navigation
my question is quite simple, but I have not
found any sufficient answer even after spending several hours in google or
reviewing this group.

I am planning a website, which is using an index.php, which has a structure
of the layout.
In this script I am planning to have several include() -statements.
One to generate the site navigation on the left margin.
Another to generate content in the mainarea of the page. The content is
stored in separate html-docs or php.-scripts, which are inserted into
index-page.
Variables, that are needed to pick the right content can be passed in the
url.

I will not use any database, because the content is quite static, but by
using php I am anyway looking for easier maintenance and updating.

My trouble is that I don't know how to generate a navigation that has three
levels, like this:
Item1 in first level ...Item1 in second level
....Item2 in second level
.......Item1 in third level
.......Item2 in third level
.......Item3 in third level
....Item3 in second level
Item2 in first level Item3 in first level Item4 in first level
....and so on....

When user enters the site, only main laevel's links are visible. When user
clicks an item on the first level, the content is updated with the
frontpage of this topic, but at the same time appropriate second level
links are displayed. And so on.
Of course I will use css to make links on different levels distinctive, so
there must be a way to set different class-value in <a> tag in different
levels.

Keyboard Navigation In Photoalbum
I've just started to learn PHP, so this may be a dumb quiestion, but I'll
ask it anyway...

Is it possible to create a photoalbum (or make use of such) with PHP,
where I could navigete with my keyboard? When some picture from a gallery
would be selected, could I navigate to next or previous picture by using
for example buttons "n" and "p" from my keyboard? Is this possible to do
with PHP or should I use JavaScript or such instead?



$_SERVER Question For Navigation
I have a remodeling site that has multiple services. Each service is in its own subfolder with an index.php. I have a leftnav bar that allows the user to navigate to each service - and I want to highlight the current service nav button.

My problem is with the url. since the basename will always be index.php - how should I set the condition for the test of the url?
Connected to this problem is - how do I code the path to the service so that it works on my local machine as well as when I upload the page (without having to manually change the path) Code:

Horizontal Navigation System
Can anyone point me in the direction of a Multi-level horizontal navigation script like the one used on digg.com? I require an admin function that can be included so a category can be selected when editing a content page etc.

How To Do Page Navigation Bar Using Php Codes?
I would like to know how to set up a page navigating system in a web site using php codes.

Prevent Random Navigation
I'm trying to code up a simple game where the user passes from one page to the next through a series of links.  How can I prevent a user from cheating by typing in the URL of a page that is not in the logical flow of the game?  Some kind of cookie trick, I'm sure, but I can't seem to wrap my head around it.

PHP Photo Gallery Navigation Problem
I am trying to get the following photo gallery code to work, but for some reason, I can only view the last image.
    

Breadcrumb Trail / Pathway Navigation...
got a breadcrumb (aka: pathway navigation) script from Zend's codegallery: http://www.zend.com/zend/spotlight/breadcrumb28.php looks like this: PHP Code:

Navigation Through Mysql Table Rows.
I am running a query on a master detail page which results in a number of records. I call this page the master detail page. The master detail page has a number of records listed as thumbnails. Each thumbnail has a link identifier which is linked to a detail page. On the detail page I have no problem querying the specific recordset through $HTTP_GET_VARS['id'] and the additional info below. PHP Code:

Page Navigation From Search Results
I have created a search form that searchs for results from my database matching the criteria to what ever the user inputs. I have done this using 2 php pages the first page points to the second, where the data is sanitised and cleaned accordingly. The results are displayed on the 2nd page. Code:

Home Link From Navigation Page
I got a code which helps me to create navigational links and only show 4 results per page. Now I want to add a link on each page such that if anyone clicks on that link it takes it to HOME page. I have added

<a href="Home.htm"><b><font size="4">Home!!</font></b></a>

inside the loop that generates NEXT and PREVIOUS page link but whenever I click on HOME it does nothing at all.

PHP Altering Navigation, More Than One Header.php File
i have been playing with my PHP navigation and trying to have more than one header.php file because of the site I am working on. Here is my code:

Navigation Back To An Html Page
I can't seem to figure out how to navigate back to an html page from a php page.

Automating Page Navigation And Control Transfer
Is there a system available to do the following:
consider an app of a few pages:

page1.php:
form1----->page3.php
form2----->page4.php

page2.php:
form3----->page3.php
form4----->page4.php

when I am at page3.php, I do not know whether I came there from
page1->form1 or page2->form3.
I can check for $_SERVER['HTTP_REFERER'] and get an answer. But this
example is simple. Let us generailze that I want an app that keeps a
track of all the pages the user requested, in the order that they were
sent to him.

Obviously, it can be written based on sessions. Is there already some
popular open source application for this?

Also, this brings me to a broader question of page navigation rules. In
an app made of 20-50 pages/scripts, life will be hell if there is no
systematic approach to transferring control between pages. Is there
some kind of structure already made and readily available into which
you just plug-in your pages by telling some rules ?

E.g. the scheme is something like:
$ListOfPages = array(
1=>"Main.php",
2=>"Edit.php",
3->"Add.php",
..........,
N->"Error.php");

$RuleSet = array(
1=>array("Main.php","Edit.php","allow_edit"),
2=>array("Main.php","Add.php","allow_add"),
...................
3=>array("Main.php","Error.php","my_error_handler")
);
The RuleSet is a set of page transfer rules based on evaluation to true
of the specified functions, i.e., allow_edit(), allow_add(),
my_error_handler() etc.
Obviously, form submission is the chief means of control transfer for
PHP programs and the use of ?op=add_something in URL's(GET) and <input
type=hidden name=op value=add_something> (POST) are a step towards
making some kind of structure.

So the grand code will look like:
$MyGrandAppControllerObj = new GrandAppControllerObj();
$MyGrandAppControllerObj->setPages($ListOfPages);
$MyGrandAppControllerObj->setRules($RuleSet);
$MyGrandAppControllerObj->Run();

Shopping Cart Navigation And Back Button Browser
I am building a shopping cart where the user adds items to his shopping cart and shippes some to himself and others to someone else as a gift.

I do the following thing, First let the user fillout his info and I ask him to check which items does he want to send to himself. Once he hit submit button I do the following.

1) I process which poduct does he want to ship to himself. Then I remove those products from the shopping cart.

2) Then if he has items in his shopping cart remaining I display address form and checkboxes asking user to check all items that he want to ship to this address.

then I repeat step 2 until the user has no more items in his shopping cart. when he has no items I will display billing page.

Here is my problem if user hits back button in the browser and then enters submit button I have not items in the shoppingcart since I removed them from his shopping cart the first time he processed his form.

So how do I deal with back button in the browser. I have no idea how to it when I have multiple forms.

Multiple Navigation Tables On One Page (master - Slave)
I just wanted to refresh only part of the page, i.e., table2 on my php page. here is my javascript code which performs the refresh it works fine and my php file display all the records. the only problem is: I have got two tables on the same page and i only want to refresh the second table when i click the a row of my first table rows. Code:

Counting External Link Clicks Whilst Maintaining Ease Of Navigation
I'm writing some php code to count the number of clicks that a link receives. Once the extra click has been counted it will redirect the user to the target webpage.

However - it must also allow the user to click the back button once on her browser in order to return to the first page (as oposed to going back to the redirect page which will then instantly send the user to the website that I'm linking to).

Sounds tricky to me but indeed.com have managed it. If you click on one of the jobs links on the following webpage you will be taken to a redirect page and then the target webpage. And... if you then use the back button in your browser you will go straight back to the search results, bypassing indeed's redirect page and so keeping navigation easy for the user: Code:

Getting Another Menu
how can I do to create another menu with the results from the options they choose?
For example, they are looking for their grades so they choose in a first menu the carreer, in other menu the grade, and then when they finish choosing the grade, It appear automaticaly in other menu all the names of the subjects concerned to te carreer and grade given.

Php Menu
How do I have The menu and the context information display at the same time? Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved