<?php
ini_set('display_errors', true);
mysql_connect('localhost', 'root', 'root')
or die(mysql_error());
mysql_select_db('bd')
or die (mysql_error());
$array =file('my_file');
foreach ($array as $value) {
$exp = explode(':', $value);
mysql_query("INSERT INTO my_table VALUES ('NULL','$exp[0]','$exp[1]','$exp[2]',
'$exp[3]','$exp[4]','$exp[5]')")
or die(mysql_error());
}
echo "Ok add!";