PHP In WordPress Page

One of the hardest things I found about operating and managing a WordPress site was when you need to insert PHP code into a webpage or post, it was almost impossible. I started looking around on the Internet trying to find some information about how to insert PHP code into one of my pages. My need was to actually take the session key and display that key on the page as well is enter it in a text box.

I tried many things but, nothing seemed to really work until I added a little plug-in. Now, everyone knows that there is almost a plug-in for everything using WordPress. However, the plug-in alone wasn’t the answer.

The plug-in I used was “PHP Code for posts” and after that I needed to figure out how I could get the session key in the page. So I tried “<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>” Which did a great job bringing the session key into the page. The only thing I needed to do there, was remove echo because I didn’t need it displayed to the user in just any old format.

From there I used a PHP get command:

<?php

// The value of the variable name is found  echo “<h3>Get This: ” . $_GET["sc"] . “</h3>”;

?>   Next thing was to enter it into the text box I use the following code;

<tr><td><input type=”hidden” name=”on0″ value=”<?php echo $_GET["sc"]; ?>”>Enter Code Here</td></tr><tr><td><input type=”text” name=”os0″ maxlength=”200″></td></tr>

Now, how to use it:

URL Example: hxxp://www.yoursite.com/test/?sc=test12345

Well, that’s about it. I hope that this is useful for someone other than myself. :-)

Provided by: Secret Shield Encryption Software.
The Easy Way to Encrypt Your Data.

Article Global Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Eli Pets

Leave a Reply