title: select numbers from database for sum
body: <p>i want to get numbers from a database and use them in a sum. i don't really know how to start but i gave it go. i got an error when i echo just one number straight from the database which didn't help my self-a-steam. i don't know what i got wrong but i think it's a simple one. this is the code:</p>
  
  <pre><code>&lt;?php
  
  session_start();
  
  $connection = mysql_connect("mysql15.000webhost.com", "a4987634_quiz", "**********")
  or die (mysql_error());
  
  mysql_select_db("a4987634_quiz", $connection)
  or die (mysql_error());
  
  $username = $_SESSION['username'];
  $password = $_SESSION['password'];
  
  $q1 = mysql_query ("SELECT 'q1' FROM users WHERE username='$username'");
  $q2 = mysql_query ("SELECT 'q2' FROM users WHERE username='$username'");
  $q3 = mysql_query ("SELECT 'q3' FROM users WHERE username='$username'");
  $q4 = mysql_query ("SELECT 'q4' FROM users WHERE username='$username'");
  $q5 = mysql_query ("SELECT 'q5' FROM users WHERE username='$username'");
  
  $result = $q1 + $q2 + $q3 + $q4 + $q5 ;
  
  echo $result ;
  
  ?&gt;
  </code></pre>
  
  <p>thanks.</p>