fixing undefined index notice
<p>I'm getting an undefined index notice, but can't figure out how to fix it.</p>

<pre><code>Notice: Undefined index: id in /home/jharvard/vhosts/localhost/html/book_details.php on line 10
</code></pre>

<p>This is the code that's having problems:</p>

<pre><code>    // query for the listing
$listing = query("SELECT name, author, id, edition, price, course, date FROM books WHERE submission = ?", $_GET["submission"]); 

// query for the email of the seller
$seller = query("SELECT email FROM users WHERE id = ?", $listing["id"]);
</code></pre>

<p>Can anyone help? Thank you very much. </p>
