<?
$file = file ('text.txt);
foreach ($file as $line) {
$fields = explode ('|', $line);
mysql_query = "INSERT INTO table SET
field1 = '$fields[0]',
field2 = '$fields[1]',
field3 = '$fields[2]',
field4 = '$fields[3]',
field5 = '$fields[4]',
":
}
?>
obviously you would fill in those "fields" with the exact names of your database fileds.