• I’ve tried to do this by putting this in the header:

    <?
    $keywords = $_GET[’keywords’];
    ?>

    and then

    <? echo $keywords;?> in the title, and in the actual post using the PHP-exec plugin (put it in the title just to make sure it wasn’t a problem with the plugin).

    The $keywords variable is empty though, even when I go to:

    myurl.com/?page_id=5&keywords=test

    I currently have the wordpress permalink set to default.

    Any ideas? Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    The PHP Exec executes all sources it finds in separate contexts. So you’ll need to declare $keywords as being global in both sections in order for the information to pass through from one to the other.

    try putting just $_GET[’keywords’]; in your phpexec code and avoid setting a global var.

    Thread Starter harveycarpenter2

    (@harveycarpenter2)

    Thanks guys

    Woah, it worked, was exactly what you said. For anybody else with the same problem, it just needed a simple:

    <?php echo $_GET["keywords"]; ?>

    Many thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Appending a get request to URL and echoing it in post?’ is closed to new replies.