<?php
mysql_connect('hostname', 'username', 'password');
mysql_select_db('databasename');
$fileName = 'filename.txt';
if (false === ($sqlContents = file_get_contents($fileName))) {
die('Error opening file '. $fileName);
}
$lineArray = explode("\n", $sqlContents)...