WordPress.org

Ready to get started?Download WordPress

Forums

Can't parse variable string from url. (5 posts)

  1. Quakebum
    Member
    Posted 6 years ago #

    Here's what I'm trying to do:

    <?php
    $kw = $_GET['kw'];
    ?>

    Somewhere on my template:

    <? echo $kw; ?>

    So, by typing: example.com/postblah/?kw=test

    It would print "test" where I put the echo but it's not printing it, could it be the permalinks?

  2. Quakebum
    Member
    Posted 6 years ago #

    anyone?

  3. Quakebum
    Member
    Posted 6 years ago #

    bump for myself

  4. Quakebum
    Member
    Posted 6 years ago #

    hello?

  5. husar
    Member
    Posted 6 years ago #

    This should work...

    $var = @$_GET['kw'];

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags