title: mySQL insert statement NOT working?
body: <p>I've been looking around for an answer. I've been cross-referencing my code with others. And I don't seem to see any blatant errors...</p>
  
  <p>My database does not update, my database does nothing. Oh and the page also does nothing too...... It's frustrating because, I'm just using notepad ++ and can't pinpoint the error. I'm using XAmpp as well, and, all the values match the ones I have made.</p>
  
  <pre><code>    The .post statement (Using jQuery 1.7.1):
      //Make sure DOM is loaded before running jQuery based code: [STATIC CODE]
  $(document).ready(function(){
  
      $('#uploadbtn').click(function() {
  
          //Parse name and song.
          var name = $('#songname').val();
          var song =  $('#songupload').val();
  
          $.ajax(
          {
              type: 'POST',
              data: 'db/upload.php?name=' + name + 'song=' + song,
              success: function(res) {
                  $('#nav-playlist').html(res);
              }
          }   
          )
  
      });
  
  });
  
  
  
  Now here is my php file:
  
  &lt;?php
  
  /*Connection to database.
     First with mysql_connect (to log in). Then selecting the master database.
  */
  echo "Upload.php accessed...";
  $connection = mysql_connect("localhost", "root", "root") or die ( mysql_error() );
  $database = mysql_select_db("betadb") or die( mysql_error() );
  
  //Properties (to be inserted into database).
  $name = mysql_real_escape_string($_POST["name"]); 
  $song = mysql_real_escape_string($_POST["song"]);
  
  //Insertion formula for mySQL
  $query = "INSERT INTO songs SET name= '$name' song='$song' ";
  
  if (mysql_query($query)){
  echo "Success";
  } 
  else {
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>ADDITIONAL NOTES:
  the song table consists of id, name, song (in that order).
  Song is the BLOB datatype, as it is used to store .mp3s</p>