title: How can i save div content into a PHP Session?
body: <p><em>i just start to learning php &amp; ajax, so pls be gentle.</em></p>
  
  <p>I have a clickable Content. When the user Click on a map, the Point Value is shown in a div. After he choose one Point he can go to the next step. </p>
  
  <p>Now i want to save the content of the div into a php session. How can i put the div content into a php session and go forward to the next step?</p>
  
  <p><strong>I tried this:</strong></p>
  
  <pre><code>  $("#btn").click(function()
  {
  
      var red = $(this).attr("id");
       $(".tab").text(red);
  
      $.post("backend.php", {"cpl": red});
  });
  </code></pre>
  
  <p><strong>Backend.php</strong></p>
  
  <pre><code>&lt;?php
   session_start();
   $_SESSION['var1'] = $_POST['cpl'];
   ?&gt;
  </code></pre>
  
  <p>But he dont do anything. What am I doing wrong?</p>