This is because when form page first loads
then there is nothing in POST, so PHP do not find any $_POST['topic']
and tells you so in NOTICE (not error)
After submit button, then the form is POSTED
and topic get one value.
To remove notice, we need to put in a test
if $_POST['topic'] is set, if it exists
If not anything posted, then is even no reason to connect to database.
Or do any query for 'topic'
<?php
if(isset($_POST'topic'])){ // anything posted????
require_once ('../mysql_connect.php'); // Connect to the database.
$dState = $_POST["topic"];
$sqlQuery = "SELECT title FROM uploaded_instructions WHERE topic=\"$dState\"";
$result = mysql_query($sqlQuery);
while ($row=mysql_fetch_array($result)){
echo ("<tr><td>$row[title]</td>");}
include ('./includes/footer.html');
} // end anything posted???
?>