|
-
Jan 5th, 2004, 10:33 AM
#1
Thread Starter
Frenzied Member
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?
-
Jan 5th, 2004, 03:38 PM
#2
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.
-
Jan 5th, 2004, 03:45 PM
#3
Thread Starter
Frenzied Member
*smacks self*.... I didn't realize you could use the "GET" array without submitting a form.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|