Re: insert to DB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




<?
   if ($_POST["$submit"])
   {
      $Name = $_POST["Name"];
   $Rating = $_POST["Rating"];

$sql = "UPDATE leaderboard SET Name='$Name', Rating='$Rating' WHERE ID=$id";
      //replace news with your table name above
      $result = mysql_query($sql);
      echo "Thank you! Information updated.";
 }
}
?>

You don't set id in this case. Of course, from some of your other code, it looks like you're relying on register_globals to be on, so maybe it is and that's not why.

David Hall

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux