Dinamiccally pull value from database
-
Hello guys!
I’m looking for a way to update editor content with value pulled from DB based on a select menu value.The base code works something like this:
<select name="user_input"> <option value="ID1"></option> <option value="ID2"></option> <option value="ID3"></option> </select> global $wpdb; $content = $wpdb->get_var( "SELECT content FROM $wpdb->table WHERE post_id=$user_input" ); $editor_id = 'mycustomeditor'; wp_editor( $content, $editor_id );
I need this to happen without a page reload.
I will greatly appreciate any help or tips.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Dinamiccally pull value from database’ is closed to new replies.