RAND() with a generated link
Your link should look like this:

&lt;a href="http://www.yoursite.com/quotes?q_id=123"&gt;Permalink&lt;/a&gt;


In your php code, you can grab the selected quote id like this:

$q_id = $_GET['q_id'];


To check if the q_id has been set:

if (array_key_exists('q_id', $_GET)) {
    // the q_id was specified
}


To check that the q_id is numeric (important to do before plugging it into a mysql query):

if (is_numeric($_GET['q_id'])) {
    // q_id is a number
}


To fetch that single quote:

$result = mysql_query("SELECT * FROM sheet1 WHERE q_id = " . $q_id);


Deprecation of mysql_ functions


  PHP functions that start with mysql_ have been deprecated as of PHP 5.5.0. If you are in a position to do so, please consider updating your code to use the MySQLi or PDO extensions instead.