Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. how can I understand which limk is clicked in previous page?

how can I understand which limk is clicked in previous page?

Scheduled Pinned Locked Moved Web Development
questionjavascriptphp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hande54
    wrote on last edited by
    #1

    Hi! I am working on online shopping web site. I use php and JavaScript for implementation . I have list of category of items as links. user clicks one of them to see list of items that belong to clicked category. I would like to know how can I understand which link is clicked on previous page. Any recommendations are really appreciated:) p.s I use code below to add link to a table <tr> <td width="186"><a href="javascript:;" class="navText">Link Text </a> </td> </tr>

    M 1 Reply Last reply
    0
    • H hande54

      Hi! I am working on online shopping web site. I use php and JavaScript for implementation . I have list of category of items as links. user clicks one of them to see list of items that belong to clicked category. I would like to know how can I understand which link is clicked on previous page. Any recommendations are really appreciated:) p.s I use code below to add link to a table <tr> <td width="186"><a href="javascript:;" class="navText">Link Text </a> </td> </tr>

      M Offline
      M Offline
      Marc Firth
      wrote on last edited by
      #2

      you could add a variable to the url you use eg

      <a href="mycart.php?item=shoes">My Item</a>

      and then access it using php. e.g: mycart.php:

      <?php
      $item = $_GET['item'];
      echo $item;
      ?>

      or the asp equivalent. If you are using javascript perhaps you could create an array of items you can add more items to. You'd be better off handling it server side though (php). BTW there's a PHP forum on CP.

      Portfolio | Web Design, Web Hosting & IT Support

      H 1 Reply Last reply
      0
      • M Marc Firth

        you could add a variable to the url you use eg

        <a href="mycart.php?item=shoes">My Item</a>

        and then access it using php. e.g: mycart.php:

        <?php
        $item = $_GET['item'];
        echo $item;
        ?>

        or the asp equivalent. If you are using javascript perhaps you could create an array of items you can add more items to. You'd be better off handling it server side though (php). BTW there's a PHP forum on CP.

        Portfolio | Web Design, Web Hosting & IT Support

        H Offline
        H Offline
        hande54
        wrote on last edited by
        #3

        Thanks a lot for your attention :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups