I have three rows with three columns in one table
id type value 1 gold 1000.00 2 silver 32.21 3 platinum 1500.00
Why not use the metal name as your key?
$update="UPDATE metals SET value = '".$gold."' WHERE type = 'gold'";
And you really need to switch to prepared statements. You're wide open to SQL injection