how can I understand which limk is clicked in previous page?
-
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>
-
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>
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.
-
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.