Re: Wordpress/PHP question
| From: | Piero Steinger | Date: | Mon, 22 Mar 2010 17:38:14 +0000 |
| Subject: | Re: Wordpress/PHP question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-303100@lists.php.net to get a copy of this message | ||
On 22.03.2010 17:47, John Tamm-Buckle wrote:
Hi all, 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 at /Users/sv/source/wpm/public_html/wp-content/themes/mystique/header.php:6) in */Users/sv/source/wpm/public_html/wp-content/plugins/wpm/wpm.php* on line *64* Line 64 contains the "header('Location: /?p=' . $postId);" line. Thanks! JohnHi What's on line 6 from file /Users/sv/source/wpm/public_html/wp-content/themes/mystique/header.php? --Piero