Results 1 to 8 of 8

Thread: [RESOLVED] Back link in php

Threaded View

  1. #1
    Join Date
    Dec 2008

    resolved [RESOLVED] Back link in php

    I am trying to get a back link to have two function. If it comes from a page in my website it will use the history.go(-1) function if it is from outsite it will go to a general page. I've tried the below script but it doesn't work.

    page 1 link <a href="page2.php?frompage=1">

    page 2 script and link.

    <a href="<?php echo $link ?>">Back to Page 1</a>

    PHP Code:
    if(isset($_GET['frompage'])) {
    $_GET['frompage'] == 1) {
    $link "<a href='history.go(-1);'>";
        } else {
    $link "generalpage.php";
    Last edited by phpnewbie08; 04-14-2014 at 01:40 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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