Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- some html codes -->
- <form name="send-message" method="post" action="">
- <label>reception name :</label>
- <input type="text" name="reception-name"/>
- <input type="submit" name="submitMessage" id="submitMessage" value="submit"/>
- </form>
- <!-- some html codes -->
- <?php
- // some php codes
- $receptionName = $_POST['reception-name'];
- $my_post = array(
- 'post_title' => $receptionName,
- 'post_content' => $messageContent,
- 'post_category' => array($category),
- 'post_status' => 'pending'
- );
- $post_id = wp_insert_post( $my_post, $wp_error );
- // and HERE is my problem... how to return a value to user?
- /* I tried :
- - header("location:sendMessage/?send=true");
- - $_SESSION['send'] = 'true';
- - global variable: $send = true
- but any one doesn't work :(
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement