Use Jquery to get data value and supply it to a session variable
<p>I need help cause I am a total newb on this.</p>

<p>I set up a session in my header:</p>

<pre><code>session_start(); 
$_SESSION['catname'] = $catname;
</code></pre>

<p>Which I retrieve in my single pages:</p>

<pre><code>$catname = $_SESSION['catname']; 
session_destroy();
</code></pre>

<p>I have several divs, each with data type that can be used by jquery:</p>

<pre><code>&lt;div class="mydiv1" data-category="cat1"&gt;&lt;/div&gt;

&lt;div class="mydiv2" data-category="cat2&gt;&lt;/div&gt;
</code></pre>

<p>Is it possible to use jquery on click function to get "cat1" and "cat2" from data-category and use this to supply $catname for my session variable?</p>

<p>Thank you!</p>
