John Tamm-Buckle wrote:
I'm storing generated data as a post in wordpress using the wp_insert_post
function, which works great. Users click a "submit" button and the things
are saved, hurrah!
However, on clicking the submit button I want to automatically navigate to
the post. This has been less successful. I've tried using:
header('Location: /?p=' . $postId);
In this case, where $postId = wp_insert_post($generated_text), and
$generated_text is the object that saves the output to a post.
Now when I try to save I get the following error:
Cannot modify header information - headers already sent by (output started
in */Users/sv/source/wpm/public_html/wp-content/plugins/wpm/wpm.php* on
Line 64 contains the "header('Location: /?p=' . $postId);" line.
You have a space someplace... most like left after some anal coder
decided it was a good idea to close all their <?php tags but didn't
think about trailing space in the files >:)
Application and Templating Framework for PHP
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php