But you need to pass the variable $myLimit through a $GET or $_POST to the page to use it in the loop. (Feel free to change it to use a $_SESSION or anything else that suits your fancy - I figured using the variable in a link would be the easiest, so most likely a $GET should do the trick.