youre right. sorry.
the $id variable is the session id ... which corresponds to the member id in the database.
when I try this code below, I get nothing.
if ($handle = opendir('data/$id')) {
while (false !== ($file = readdir($handle))) {
if (preg_match("/$sieve/", "$file")) {
$data = file_get_contents('data/$id/'.$file);
list($title, $desc, $time, $class) = explode("|-NN-|", $data);
echo '<div class="' . $class . '"><span>' . $title . '</span>';
echo $desc;
echo '<span>' . $time . '</span></div>';
}
}
closedir($handle);
}
But for example, if the member id is "7".
and I put this code in ... it works.
if ($handle = opendir('data/7')) {
while (false !== ($file = readdir($handle))) {
if (preg_match("/$sieve/", "$file")) {
$data = file_get_contents('data/7/'.$file);
list($title, $desc, $time, $class) = explode("|-NN-|", $data);
echo '<div class="' . $class . '"><span>' . $title . '</span>';
echo $desc;
echo '<span>' . $time . '</span></div>';
}
}
closedir($handle);
}