Results 1 to 3 of 3

Thread: carry title of link to next page?

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    carry title of link to next page?

    I have a menu that is a bunch of links. When the user clicks on one of those links, I would like to pass the text of that link to the next page, but I would not like to use a traditional form, because the user will be directed to a specific page depending on which link is clicked.

    Is there a way to do this?
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629
    You could use GETs.

    It will definitely depend on how your page is set up, but this is a way you could do it:

    PHP Code:
    <!-- THIS IS YOUR MENU -->
    <a href="link_name1.php?name=Link%20Text%201">Link Text 1</a><br><br>
    <a href="link_name2.php?name=Link%20Text%202">Link Text 2</a><br><br>
    <a href="link_name3.php?name=Link%20Text%203">Link Text 3</a><br><br>

    <!-- THIS IS THE CODE TO TAKE THE LINK NAME AND DISPLAY IT -->
    <h1><?=$_GET['name'];?></h1>
    Oh, and if you didn't know, %20 calls a space.
    Like Archer? Check out some Sterling Archer quotes.

  3. #3

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    *smacks self*.... I didn't realize you could use the "GET" array without submitting a form.

    Thanks
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

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



Click Here to Expand Forum to Full Width