Getting id of user-submited posts
-
Hello.
Im using this to create new post:
$my_post = array();
$my_post[‘post_title’] = ‘Ankieta wype?niona przez: ‘ . $a11;
$my_post[‘post_content’] = $info;
$my_post[‘post_status’] = ‘publish’;
$my_post[‘post_author’] = 1;
$my_post[‘post_category’] = array(1);wp_insert_post( $my_post );
how can i get the id of that new post? i need this id to be saved in a separate sql table.
this is for people who are filling my form with some questions. i need to send them link to their posts via email.
thx ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Getting id of user-submited posts’ is closed to new replies.