WordPress.org

Support

Support » Plugins and Hacks » pagination using $_GET or $_POST

pagination using $_GET or $_POST

  • I’ve poured over the forums and codex to get this working for days. Some of my posts have a lot of image content that slows siteload down considerable as one page. <!–nextpage–> does not work to my satisfaction, so I need to customize a script. I tried using $_GET, but with pretty permalinks, it’s not working right (whether in preview or post mode), and the info here is not sufficient for a solution.

    So I’m down to using &_POST with PHP_SELF as form action. While my numbers show on my development .php page, it won’t show in a post. this is my code:

    <form action="[php] htmlentities($_SERVER['PHP_SELF']); [/php]" method="POST">
    [php]
    
    $said_page = 1;
    $last_said_page = 10;
    $last_said_page++;
    do {
        echo "<input type='submit' name='$said_page' value='$said_page' />  ";
    } while ($said_page++ !== $last_said_page);
    
    [/php]
    </form>

    What am I doing wrong here?

  • The topic ‘pagination using $_GET or $_POST’ is closed to new replies.
Skip to toolbar