Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. $("#click_ajax").click(function() {
  2. alert(counter);
  3. $.ajax({
  4. type: 'post',
  5. url: 'test.php',
  6. data: {counter:counter},
  7. success: function () {
  8.  
  9. alert("SENT!");
  10. }
  11. });
  12.  
  13. });
  14.  
  15. <?php
  16.  
  17. $counter = $_POST['counter'];
  18.  
  19. echo $counter
  20.  
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement