Guest User

Untitled

a guest
Nov 22nd, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <script>
  2. $('product_li a).click(function(){
  3. $.cookie("li_click_data", $(this).parent().innerhtml());
  4. return true;
  5. });
  6. </script>
  7. ......
  8. <li class="product_li"><a href="xxx">your product title</a></li>
  9.  
  10. $_COOKIE['li_click_data'];
  11.  
  12. // for list_items.php
  13. foreach($item as $i) {
  14. // Do what you normally do, but also set an array in the session.
  15. // Presuming you have an id or some other means (here as item_id), to identify
  16. // an item, then you can also access this array on the item_details -page.
  17. $_SESSION['mystic_item_data_array'][$i['item_id]] = $i['thedata'];
  18. }
  19.  
  20. // For item_details.php
  21. $item_id = // whatever means you use to identify items, get that id.
  22. $data_you_need = $_SESSION['mystic_item_data_array'][$item_id];
Add Comment
Please, Sign In to add comment