WordPress.org

Forums

[resolved] PHP Query Question (9 posts)

  1. Belmont
    Member
    Posted 9 years ago #

    Hey Folks,

    Im having some problems using php inside my WP pages and posts, ive installed the run php hack and it doesnt appear to have resolved the issues so figured id start a post.

    What im trying to do is include a link such as this..

    http://www.domain.com/?<?php echo "$QUERY_STRING"; ?>

    Inside my posts and/or the page template itself but WP seems to be stripping off the end of the php query.

    Any idea how i can get this to work?

    TIA for any help.

  2. Belmont
    Member
    Posted 9 years ago #

    As you can from the above link, thats EXACTLY whats happening in my WP blog LOL

  3. McShelby
    Member
    Posted 9 years ago #

    You can try my Exec PHP plugin. I wrote it specifically to have a more advanced quote handling than the other known PHP plugins.

  4. Belmont
    Member
    Posted 9 years ago #

    I have that plugin installed and it doesnt work :(

  5. McShelby
    Member
    Posted 9 years ago #

    You said, you've installed the run php hack. So which one did you really installed. Is there a link to see the outcome?

  6. Belmont
    Member
    Posted 9 years ago #

    Ive installed them both.

    You can see whats happening in the link i posted above.

    But you can also see it at http://www.hardcorepride.com too.

  7. Belmont
    Member
    Posted 9 years ago #

    If you click on this link to go to the site..

    http://www.hardcorepride.com/?1234

    What i want is for the ?1234 part to carry across to the url on the page, in normal php/html pages it works fine just not in WP or any of the other 25 blogs ive installed trying to get it to work :(

  8. McShelby
    Member
    Posted 9 years ago #

    You may want to try this:

    <?php echo $_SERVER["QUERY_STRING"]; ?>

  9. Belmont
    Member
    Posted 9 years ago #

    Excellent thanks so much for the help :)

Topic Closed

This topic has been closed to new replies.

About this Topic