title: MYSQL SELECT query does not work
body: <p>I want to select email address from DB to send a email. Following is my query that I have made.</p>
  
  <pre><code>$userID=$_SESSION['userID'];
  
  $select_query = mysql_query("SELECT * FROM employee WHERE emp_id = '$userID'");
  $select_sql = mysql_fetch_array($select_query);
  $name=$select_sql['manager_name'];
  
  $select_query1 = mysql_query("SELECT email FROM employee WHERE employee.name='$name'");
  $select_sql1 = mysql_fetch_array($select_query1);
  $email=$select_sql1['email'];
  </code></pre>
  
  <hr>
  
  <p>But $select_query1 return "NULL Invalid address:" instead of the correct value. I could not found the problem with this. Please help ! </p>