I want to send article id using session, Source page contains many links to open one webpage but id is there in ID attribute of a href. like
<br/>
< a id="13" class="openpage" href="test.html">open test form< /a><br />
I have used javascript to pass the variable
$(".openpage").on('click', function() {
var artid = $(this).attr("id");
<?php $_SESSION['artid'] = "<script>document.write(artid)</script>"?>
});
var artid is having the correct value before loading the new page and $_SESSION['artid'] is not getting the value of artid.