Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Web Design & Development
Tag Cloud
access acer asus batch bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory monitor motherboard mouse network operating system printer problem ram registry router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
PHP & Mysql menu

Reply  
Thread Tools
JPLamb's Avatar
Computer Specs
Senior Member with 516 posts.
 
Join Date: Jan 2005
Location: York, UK
Experience: A bit of this & that
30-Jan-2010, 09:06 AM #1
PHP & Mysql menu
hi all,

My webdesign skills are very limited, I can use html and some very basic php but i havent used it for a while so i will have to read from the begginning.

I have a website at the min that i am starting to update and am wanting to make the menu on the left side come from a database so i can easily update it.

the website is http://jplamb.ath.cx/

does anybody have a template that i could use, i wiould like to make it so you could press, downloads for instance and then it would list the different download pages, like below

(menu before click)
Home
Downloads
Contact
About

(Menu after click)
Home
Download
____Antivirus
____Editing software
____Games
____Other
Contact
About

I know mostly how to sort the database side out but pointers on this would be great.

thank you very much

JPLamb
__________________
JPLamb
ehymel's Avatar
Senior Member with 660 posts.
 
Join Date: Aug 2007
Location: Texas
01-Feb-2010, 01:03 AM #2
I don't have what you're looking for, but I have to say that using a database to do this seems quite the overkill. Why not just use a simple snippet of code that generates the menu, store that in a separate file, then pull that file in as an include with every page on your site? MUCH simpler to both implement and maintain.
__________________
E.
JPLamb's Avatar
Computer Specs
Senior Member with 516 posts.
 
Join Date: Jan 2005
Location: York, UK
Experience: A bit of this & that
05-Feb-2010, 07:12 AM #3
thank you for your reply, Sorry it has taken me a bit of time to reply.

so do i create a basic html page with the links in and then link this in to my main page?

would i have to use a frame to pull the page in? if not how would i do this so that it will work well?

Cheers
__________________
JPLamb
Mr.LLB's Avatar
Member with 289 posts.
 
Join Date: May 2008
Location: Toronto, Ontario
Experience: Advanced
05-Feb-2010, 02:37 PM #4
no. what ehymel means is to create your page and leave the menu area blank and create the menu in a different page and simply link to this page from any page on your website.

so 1 file with the menu in it.

and the rest of your website simply links to this page using the include tag to pull in the menu. this way, all you will need to do is update that one file and the menu gets updated on your entire website.
__________________
<?php $h="Hello "; $w=" World"; echo $h.$w; ?>
ehymel's Avatar
Senior Member with 660 posts.
 
Join Date: Aug 2007
Location: Texas
07-Feb-2010, 01:47 AM #5
Yes, Mr.LLB is right, although the phrase "link to this page from any page" is a little confusing. It's not a link as in <a href> html link, but instead an include command in php. This page has a great example of exactly what you are needing.
Mr.LLB's Avatar
Member with 289 posts.
 
Join Date: May 2008
Location: Toronto, Ontario
Experience: Advanced
07-Feb-2010, 02:34 PM #6
lol sorry.... but yeah thats a good example
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:35 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.