Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
03-15-2009, 05:40 AM #1
- Join Date
- Mar 2009
- Thanked 0 Times in 0 Posts
breadcrumb through a href variables
ok heres my problem
I have 2 differnt sets of links each with vairiable included
[code=text]<a href=USA.php?state = texas> TEXAS </a>
<a href=USA.php?state = california> CALIFORNIA </a>[/code]
[code=text]< a href=USA.php?service = church> Churches </a>
< a href=USA.php?service = hospital> Hospitals </a>[/code]
when the first menu is clicked on it only dispalys the state but when the second menu is clicked on it displays both the sate and the service displaying it in the same manner as the breadcrumb trail at the top of this page "Board index » Programming » PHP - Code". Can anyone PLEASE help me to figure this one out? Im using SWITCH at the moment and can get one or the other menu to display its location but not both. Grrr Im going out of my head
03-15-2009, 01:29 PM #2
- Join Date
- Mar 2007
- Thanked 2,224 Times in 2,211 Posts
I think the easy way is to add the first parameter along with the second set of links like
then write a condition in the USA.php page to check the value of variable state and then echo the required link. It's not a foolproof method as when some one edit the url from the address bar, s/he won't get that advantage.Code:<a href="USA.php?
state=texas&service=church"> Churches </a> <a href="USA.php?
state=texas&service=hospital"> Hospitals </a>
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)