Tag Info

New answers tagged

0

You have a problem with your code formatting and syntax at the very least: function ref_access(){ global $error; if (is_user_logged_in()) // <-- problem here... $newdb = new wpdb( 'user', 'pass', 'db', 'localhost' ); global $newdb; $hf_username = wp_get_current_user(); $inputValue = $_POST[$quanid]; $wpdb->insert( $table, array( 'ItemID' => ...


1

Can you just tell me how I can grab the input value for "name" and add the entry to custom_post_type? Sure thing: if ( isset( $_POST['name'] ) ) { $name = sanitize_text_field( wp_unslash( $_POST['name'] ) ); if ( $name ) { wp_insert_post( array( 'post_title' => $name, 'post_type' => ...



Top 50 recent answers are included