//and you'll display the quote accordingly if (isset($_GET['quote'])){ //First you check if the user wrote the ?quote= part { if (is_integer($_GET['quote'])) //You also want to check if they specified an actual number { //Put your stuff to display the quote here } }