ok, here the deal, i want users to rate the current song playing, so, if the song isnt in the database it wil be created, however, i want it to update that same song if it is voted again...but i cant get it to update :'( ...some help would be REALLY appreciated...thanks :D http://lynkonline.atlas2wielers.nl/index.temp.php <? /* $song[0] is connected to my winamp. it shows the current song playing! */ ?> <? if(isset($_POST['form'])){?> <?php function lynkfm_rate(){$select_data = "SELECT * FROM lynk_fm WHERE song='$song[0]' LIMIT 1"; $object = mysql_query($select_data) or die($MySQLError.mysql_error()); return $object; } $res99 = lynkfm_rate(); $show = mysql_fetch_object($res99); $new_score = $show->score + $score2 ; $new_vote = $show->votes + 1 ; ?> <? if( $show->song = "$song[0]") {mysql_query("UPDATE lynk_fm SET score='$new_score', votes='$new_vote' "); echo"new score: $show->score"; } elseif ($show->song != "$song[0]") {mysql_query("INSERT INTO lynk_fm (id,date,artist,title,song,score,votes) VALUES ('', '$date_now', '".htmlspecialchars($artist)."', '".htmlspecialchars($title)."', '".htmlspecialchars($song[0])."', '$score2', '$votes') ") or die(mysql_error()); echo"$show->title"; } else{echo "UPDATE DIDNT WORK! !!";}?> <? } ?> <form method="post" name="lynk_fm" action="<?=$PHP_SELF?>"> <input type="hidden" name="form" value="1"> <select name="score2"> <option disabled>Rate</option> <option value="10">10</option> <option value="9">9</option> <option value="8">8</option> <option value="7">7</option> <option value="6">6</option> <option value="5">5</option> <option value="4">4</option> <option value="3">3</option> <option value="2">2</option> <option value="1">1</option> </select> <input name="Submit" type="submit" class="I_send" value="Go >" /> Rate this song!</form>