So this is posted to you via a form? Seems simple enough...
$data = explode("\n", str_replace("\r\n", "\n", $_POST['data']));
$fields = array_shift($data);
$fields = str_replace('"', '`', $fields);
$values = '';
foreach($data as $line)
$values .= '(' . $line . '), ';
$values = rtrim($values, ', ');
$query = "INSERT INTO `myTable` ($fields) VALUES $values";
Note that this assumes that the field list will be the very first line of the data.
EDIT: I added a bit on to my code to account for \r\n line endings.. though the $data line might be better (and more efficiently?) written as:
$data = preg_split('/\r?\n/', $_POST['data']);