How to create backlink using JavaScript or PHP

Backlinks for pages can be implemented either by using php or javascript. Code block for these two is as follows –

<a href=”<?php echo $_SERVER[‘HTTP_REFERER’] ?>”>Back Via PHP</a>

<?php echo “<br />”.”—————-“.”<br />”; ?>

<a href=”javascript:history.go(-1);”>Back Via JavaScript</a>

<?php echo “<br />”.”—————-“.”<br />”; ?>

<a href=”javascript:history.back()”>Another JS Back Button</a>

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s