[php] noob > triggering msql query

I’m too used to Dreamweaver and add ons that I never really learned any normal PHP programming (well a lot but not everything heh).

  <?php 
  $result =$_SESSION['kt_userCredits'] + $_SESSION['kt_userMoney'];
  $sql = "UPDATE User SET userMoney = userMoney+userCredits, userCredits = 0 WHERE userID = 'userID'"; ?>
  <? echo $result ?>.</p>
  
  <?php if (!isset($_GET['action'] == "collect")) {
    mysql_query($sql);
    } ?>

I have been trying to get this to work for a long time now. After playing a Flash game, the score gets sent to row userCredits.

I first tried making a form that would have a button that would cause the update, but after 3 days of struggling with that, I ran out of ideas…

I guess something’s wrong with the GET function… if someone could help me out, that’d be greatly appreciated :hugegrin: