Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <!-- some html codes -->
  2. <form name="send-message" method="post" action="">
  3. <label>reception name :</label>
  4. <input type="text" name="reception-name"/>
  5. <input type="submit" name="submitMessage" id="submitMessage" value="submit"/>
  6. </form>
  7. <!-- some html codes -->
  8. <?php
  9. // some php codes
  10. $receptionName = $_POST['reception-name'];
  11. $my_post = array(
  12. 'post_title' => $receptionName,
  13. 'post_content' => $messageContent,
  14. 'post_category' => array($category),
  15. 'post_status' => 'pending'
  16. );
  17. $post_id = wp_insert_post( $my_post, $wp_error );
  18. // and HERE is my problem... how to return a value to user?
  19. /* I tried :
  20. - header("location:sendMessage/?send=true");
  21. - $_SESSION['send'] = 'true';
  22. - global variable: $send = true
  23. but any one doesn't work :(
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement