Automatically call the current webpage into a link

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
DTP
Forum Newbie
Posts: 1
Joined: Thu Sep 21, 2006 1:27 am

Automatically call the current webpage into a link

Post by DTP »

Topicname... If I knew what to call it... I'll do the best I can.

I want to be able to automatically call the current page into a link, and then add
some standard text to it which will remain the same.

so something like <a href="{current page}_AB.php>Link name here</a>

Where

{current page} = http://www.domain.com/index.php?pagename for example

and

_AB.php would remain constant.

Theoritically it should be possible.

I have tried searching for it, but don't know what the function is called thus where to start searching. :? ;)

Many thanx ahead of time.
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

Code: Select all

<a href="<?=$_SERVER['PHP_SELF']?>_AB">Link text</a>
should do it
Post Reply