i have a folder which pictures of candidates from all the states but i need to get pictures of candidates for one state and put them in another folder my database contains directory of all the files in the picture folder
please help
it not working please whats wrong
please help
Code:
//get the picture directory in an array
$qry="select pix from corper";
$rst=mysql_query($qry) or die (mysql_error());
$num=mysql_num_rows($rst);
while($r=mysql_fetch_assoc($rst)){
$pix[]=$r["pix"];
}
for($file as $pix[]){
// set file to read
$file = 'picture/'.$pix[].;
// open file
$fh = fopen($file, 'r') or die('Could not open file!');
// read file contents
$data = fread($fh, filesize($file)) or die('Could not read file!');
// close file
fclose($fh);
echo $data;
}
Comment