Strings need to be surrounded by quotes in sql, integers do not. Complex structures (like arrays) should also be surrounded by {curly braces} when within double quoted strings.
$result = mysql_query("UPDATE new_line_test SET data = '{$_POST['datatoenter']}' WHERE ID = 1")
Also, you should not place user data directly into your queries as it leads to all sorts of security issues. Run $_POST['datatoenter'] through mysql_real_escape_string first.
$data = mysql_real_escape_string($_POST['datatoenter']);
$result = mysql_query("UPDATE new_line_test SET data = '$data' WHERE ID = 1")