title: This won't work? Any suggestions?
body: <p>I've got this script I'm working on to rate music, there are no errors, and I'm getting 'Data Inserted', I'm aware I haven't escaped the data yet, but are there any problems in this script that might be preventing it from putting the inserted data in to the database?</p>
  
  <pre><code> &lt;?
      include($_SERVER['DOCUMENT_ROOT'].'/assets/global/scripts/connect.php');
      $songname = $_GET['songname'];
      $artist = $_GET['artist'];
      $ratenum = 1; 
      $chkquery = "SELECT * FROM hotmuze_music WHERE songname='$songname'";
      $plusOneQuery = "SELECT * FROM hotmuze_music WHERE songname='$songname'";
      $updateQuery = "UPDATE hotmuze_music SET rating='$rating2' WHERE songname='$songname'";
      $checkdata = mysql_query($chkquery);
      $checkrows = mysql_num_rows($checkdata); 
      if($checkrows==0) 
      {
      $insquery = "INSERT INTO hotmuze_music (id, songname, artist, sex, genre, rating, promoted) VALUES('', '$songname', '$artist', '', '$genre' '$ratenum')";
      $insdata = mysql_query($insquery); 
      } 
  
  
      if($checkrows!=0) 
      { 
      $plusData = mysql_query($plusOneQuery);
      }
  
      if(mysql_num_rows($plusData)!=0) 
      {
      $result = mysql_fetch_assoc($plusData);
      $rating = $result['ratng'];
      $rating2 = $rating+1;
      mysql_query($updateQuery); 
      echo "Data Inserted";
      } 
      ?&gt;
  </code></pre>
  
  <p>Thanks! :)</p>