Actually, I found an easier way. Use distinct. It can be used across several columns. Here's an example I think you may find helpful. http://sqlfiddle.com/#!2/40133/1

First, I'm wondering why you're using frames? If you're wanting to have consistent banner and navigation portions of the page without having to write it into each page, just use php's include_once() statement. You're page (say index.php) may then look something like this:

<html>
<div style="width:1000px;margin:auto;border:1px solid black;">
    <div><?php include_once('banner.php'); ?>&nbsp;</div>
    <table style="border-collapse:collapse;">
        <tr><td style="padding:0px;width:100px;border:1px solid black;">&nbsp;</td>
            <td style="padding:0px;width:800px;border:1px solid black;"><?php include_once('home.php');?></td>
            <td style="padding:0px;width:100px;border:1px solid black;"><?php include_once('accounts_page.php');?></td>
        </tr>
    </table>
</div>
    </html>

Ok, yea I see my other error! I forgot that you have to tell php how you want to open it. Try $fh=fopen('uploads/datei.txt','r'); That opens it with read-only privileges.

That's my mistake. The first line should be $fh=fopen('uploads/datei.txt');

Oh, I noticed that you said your file has multiple lines. To read the file line-by-line, use fgets() [URL="http://php.net/manual/en/function.fgets.php"]http://php.net/manual/en/function.fgets.php[/URL] like this:
[CODE]
$fh='file.ext';
while(!feof($fh)){//this will loop through the file line-by-line until you reach the end of the file.
$string = fgets($fh);
$array[].=substr($string,a,b); //a is where you start your string. First character in a string is at position 0. b is how many characters you need to get
$array[].=substr($string,a,b); //repeat for each slice you need to get
}
$new_variable = implode(';',$array); //now you'll a new variable might look like 000000;354120120131;
[/CODE]

cereal's code will work perfectly if you need to split it into strings of the same length. To split it into variable lengths, then you should use substr() [URL="http://php.net/manual/en/function.substr.php"]http://php.net/manual/en/function.substr.php[/URL] like this: [CODE]$string = file_get_contents('file.ext');
$array[].=substr($string,a,b); //a is where you start your string. First character in a string is at position 0. b is how many characters you need to get
$array[].=substr($string,a,b); //repeat for each slice you need to get
$new_variable = implode(';',$array); //now you'll a new variable might look like 000000;354120120131; [/CODE]
To write it to a csv, you can use fputcsv(); [URL="http://php.net/manual/en/function.fputcsv.php"]http://php.net/manual/en/function.fputcsv.php[/URL]. CSV files are comma delimited, so to use fputcsv(), then you will just leave out the $new_variable = implode(';',$array); line from the previous code, and use:
[CODE]
$fp = fopen('file.csv', 'w'); //opens file.csv and clears its contents if it exists or creates a new one if it doesn't exist.

fputcsv($fp, $array); //Inserts array into file.csv with each item in the array separated by a comma.

fclose($fp);[/CODE]
If you do need the file to be separated by ';' instead of ',', then you can use fwrite() [URL="http://php.net/manual/en/function.fwrite.php"]http://php.net/manual/en/function.fwrite.php[/URL]. Just add this to my first chunk of code:
[CODE]
$fp = fopen('file.csv','w');//could be a different file extension
$fwrite($fp,$new_variable);//will write to the file all of the chunked $array items that we separated with ';' in the implode function
fclose($fp);[/CODE]

cereal commented: great +8
apa3 commented: Thank you so much for your great support! Regards ... SAM. +1

All you need to do is change $_POST to $_POST['family'].