How can I send a # in the URL to go down the page w/ PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
compuXP
Forum Newbie
Posts: 17
Joined: Sat Feb 26, 2005 11:19 am

How can I send a # in the URL to go down the page w/ PHP?

Post by compuXP »

Hi,

How can I send variables through the URL in PHP, and ALSO a # so it will go to an A TITLE="something" tag...?


I need this for my forums, a "go to post" feature.

Thanks,

-compuXP
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

$_GET[] and $HTTP_GET_VARS[] for grabbing URL variables and use html anchor tags to allow quick views '#'
compuXP
Forum Newbie
Posts: 17
Joined: Sat Feb 26, 2005 11:19 am

?

Post by compuXP »

Oh... yeah.... ok... I'm a bit new to PHP. What do you mean, quick view?

What would the URL look like? Like this?:

http://www.site.com/page.php?a=182&bat=19#pagelocation

Or...?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yes, they look like that.

Code: Select all

<a name="pagelocation"></a>
would work with that url..
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

compuXP
Forum Newbie
Posts: 17
Joined: Sat Feb 26, 2005 11:19 am

Post by compuXP »

Oh, ok, thanks! But, when I tried it, it didn't work... 8O is that bad? :(
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

You must be doing something wrong. Did you read through the anchor tag tutorial I posted?.
Post Reply