Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <form id="#form1" method="get" action="http://localhost:/learndash3/chain-announcements">
  2.  
  3. <?php echo $_SERVER['PHP_SELF']; ?>
  4.  
  5. <button type="submit" name="submit" class="btnadd">AddSelected</button>
  6.  
  7. <?php
  8.  
  9. if (isset($_GET['submit'])) {
  10. $checked = $_GET['item'];
  11. if($checked !=""){$checked_string = implode(" ",$checked);
  12. update_user_meta( $current_user->ID, 'archived_announcements', checked_string);
  13. //echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$current_URL.'">';
  14. echo $checked_string;
  15. }else{
  16. echo "nothing selected";
  17. }
  18. }
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement