I'm sorry if it's a stupid question, but I don't now how to call a php script for every row from my table. I'm using mysql. (I will use PDO in the future, I know it's better). this is my "select" page ( where I select the rows that I want):

```
<?php
include "util.php";
conn();
$SQL = "SELECT * FROM profiles where name='beatrice'"; //it's just an example
$result = mysql_query($SQL);

    while ($db_field = mysql_fetch_assoc($result)) {
                        $id= $db_field['id'] ;
                        $nome= strtolower($db_field['name']);
                        $cognome= strtolower($db_field['surname']);
                        $filenome= strtolower($db_field['filename']);
                        $cf= $db_field['cf'];
                        $dir1 = mb_substr($cf, 0, 8);
                        $dir=$id.$dir1;
                        mkdir('test/doc/'.$dir, 0777, TRUE);
                        mkdir('test/doc/'.$dir.'/foto', 0777, TRUE);
                        mkdir('test/doc/'.$dir.'/thumbnails', 0777, TRUE);
                        header('Location:renamer.php?dir='.$dir.'&nome='.$nome.'&filenome='.$filenome.'&id='.$id);
    }

    ?>

```

Header location doesn't work, so I'm searching for another way to do it.