If you want to insert PHP code into your WordPress blog post or page itself, you’re going to need to install a plugin called RunPHP. The plugin’s developer’s site can be found here: http://www.nosq.com/blog/2006/01/runphp-plugin-for-wordpress/. You can download this plugin, install it quickly, and start using PHP code in your page.
I found this especially useful for embedding Perl scripts and AJAX code into my pages that PHP runs as CGI. So far, I haven’t found another way to do this so be sure to share any other methods of running code on WordPress pages and posts.
