Advertisement
bowenac

isset

Aug 28th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: ad task
  4. */
  5. require_once('../../../wp-config.php');
  6. global $wpdb;
  7. ?>
  8. <?php
  9. ?>
  10. <?php
  11. if (isset($_POST['submit']))
  12. {
  13. $table_name = $wpdb->prefix . "tasks";
  14. $user_ID = get_current_user_id();
  15. $wpdb->insert( $table_name, array( 'task_name' => $_POST['taskName'], 'user_id' => $user_ID ) );
  16. echo'<script> window.location="http://savvychorecharts.com/my-tasks"; </script> ';
  17. }
  18. else
  19. {
  20.    echo "no data posted";
  21. }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement