Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    5
    Thanks
    1
    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
    IE
    menu 1
    [code=text]<a href=USA.php?state = texas> TEXAS </a>
    <a href=USA.php?state = california> CALIFORNIA </a>[/code]

    Menu 2

    [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

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I think the easy way is to add the first parameter along with the second set of links like
    Code:
    <a href="USA.php?state=texas&service=church"> Churches </a>
    <a href="USA.php?state=texas&service=hospital"> Hospitals </a>
    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.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •