Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: ad task
- */
- require_once('../../../wp-config.php');
- global $wpdb;
- ?>
- <?php
- ?>
- <?php
- if (isset($_POST['submit']))
- {
- $table_name = $wpdb->prefix . "tasks";
- $user_ID = get_current_user_id();
- $wpdb->insert( $table_name, array( 'task_name' => $_POST['taskName'], 'user_id' => $user_ID ) );
- echo'<script> window.location="http://savvychorecharts.com/my-tasks"; </script> ';
- }
- else
- {
- echo "no data posted";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement