$query = "INSERT INTO user (user_id,
mysql_query($query) or die('Query "' . $query . '" failed: ' . mysql_error());
Of course, there are many different ways to do it, but that works.
Python has a slightly cleaner way of doing this, but... that's another story, I suppose.