I need to pass some js variables from index.php
to php variable on tags.php
- without using forms
- without using address bar
- and go to tags.php
index.php
$('#m1tags').click(function(){
var id = $('.pmarked').data('id'); // an integer
$.ajax({
url: 'tags.php',
type: 'post',
data: {'id': id},
success: function() {
}
});
location.href='tags.php';
});
tags.php
<?php echo $_POST['id'];?>
Notice: Undefined idex: id...
Any help?