Passing values via an Ajax querystring

The problem was with my counter value. It was initially being set as a string so I converted it to an integer and everything worked perfectly. Finished code: Page data being sent from $(“iframe”).mouseover(function(){ <?php global $post; $id = $post->ID; ?> $.ajax({ type: “POST”, url: “<?php bloginfo(‘template_directory’); ?>/ajax.php”, data: “pid=<?php echo $id; ?>”, cache: false, … Read more