first read in that file using:
$rows = file("xxxx.csv");
now, $rows is an array with one record per element.
iterate through that array, e.g. using foreach:
foreach($rows as $row)
{
now in each loop, $row contains one of the records.
split the record into its parts:
$fields = explode(',', $row);
fields is now an array with one field per element of the actual record.
iterate through the fields using for:
for($i=0; $i<count($fields); $i++)
{
here you can do the check for validity.
assuming the third field of a csv record is the email address:
if($i == 5)
{
check for validity here; you can change the value if you need.
}
add similar ifs for checking other fields. then close the for.
}
now tie together the insert statement:
$sql = "insert into thetable values(".$fields[0].",'".$fields[2]."' ... ";
execute it!
then close the foreach and let the script process the next row.
}
good luck!