LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 11-29-2009, 03:26 AM   #1
ludo33
Member
 
Registered: Feb 2009
Posts: 119

Rep: Reputation: 16
Suggest a PHP snippet for 2/3 tier menu


Hello,

I'm looking for a simple php snippet or jquery example that would implement a 2 or maybe 3 tier navigation menu from an array. I've looked about the net but many of them seem insecure ie liberal use of the $_GET tag

Something like:

Cats
Dogs

Clicking on cats would take you to a page with siamese manx....
Clicking on Dogs would take you to Pedigree Mongrel then on to corgi, alsation..

Better to ask first than be sorry later!

Thanks in advance good folks...

Ludo..

Last edited by ludo33; 11-29-2009 at 03:37 AM.
 
Old 11-30-2009, 12:18 PM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 85
What is it that you perceive as insecure about the use of the $_GET array?

If it is being used to change the state of the server (e.g. inserting data into a database), then that is not a good idea. However, if it is being used to select what content to display and/or how to display it, then, as I see it, this is exactly what $_GET is for.

The advantages of using the $_GET array are simplicity, and that a static URL is automatically provided to the user (e.g. http://www.example.com/page.php?content=cat&theme=cute), allowing them to link to / bookmark the page. The exception might be a page that you do not want someone to be able to go to directly (e.g. one requiring login). Using it for indicating what menu/submenu to display isn't much different, IMHO (.../page.php?cat=cat&subcat=siamese).

Last edited by Robhogg; 11-30-2009 at 12:57 PM. Reason: Clarification
 
1 members found this post helpful.
Old 12-01-2009, 05:34 AM   #3
ludo33
Member
 
Registered: Feb 2009
Posts: 119

Original Poster
Rep: Reputation: 16
Thanks

For you reply, I have read a lot about incorrect use of $_GET and the dangers held within. Now, thanks to your reply I now know why!

Siamese cats here I come!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
suggest software for full screen menu/launcher technononsense Linux - Software 3 08-17-2009 08:40 AM
1 tier cluster with HA and load balancing red_coder Linux - Server 3 04-10-2008 02:29 AM
Emacs smart-snippet rejeep Linux - Desktop 0 02-06-2008 02:54 PM
LXer: osCommerce is first class for second-tier toy retailer LXer Syndicated Linux News 0 10-21-2006 02:03 AM
calendar-related code snippet request Citizen Bleys Programming 2 12-11-2001 01:11 PM


All times are GMT -5. The time now is 11:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration