Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $('product_li a).click(function(){
- $.cookie("li_click_data", $(this).parent().innerhtml());
- return true;
- });
- </script>
- ......
- <li class="product_li"><a href="xxx">your product title</a></li>
- $_COOKIE['li_click_data'];
- // for list_items.php
- foreach($item as $i) {
- // Do what you normally do, but also set an array in the session.
- // Presuming you have an id or some other means (here as item_id), to identify
- // an item, then you can also access this array on the item_details -page.
- $_SESSION['mystic_item_data_array'][$i['item_id]] = $i['thedata'];
- }
- // For item_details.php
- $item_id = // whatever means you use to identify items, get that id.
- $data_you_need = $_SESSION['mystic_item_data_array'][$item_id];
Add Comment
Please, Sign In to add comment