Question : Need some helps.

Hi all Experts,

Please assist me how to get a dropdown menu with dates so that I can choose which date to copy all the files with extension of (.txt) on that date (the date that I decided) to another directory. Thanks in advance.

<?php
$So = 'test/';
$De = 'test/temp/';

if ($OpenSource = opendir($So))
{
   while (false !== ($file = readdir($OpenSource)))
   {
      if ($file != '.' && $file != '..' && date('m.d.Y', filemtime($file))==$_REQUEST['file_date'])
      {
          copyemz("$So/$file", "$De/$file");
      }
   }
   closedir($OpenSource);
}
    function copyemz($file1,$file2){
          $contentx =@file_get_contents($file1);
                   $openedfile = fopen($file2, "w");
                   fwrite($openedfile, $contentx);
                   fclose($openedfile);
                    if ($contentx === FALSE) {
                    $status=false;
                    }else $status=true;

                    return $status;
    }
?>
<select name=file_date>
<option>07.01.2010</option>
<option>07.02.2010</option>
<option>07.03.2010</option>
</select>

Answer : Need some helps.

Random Solutions  
 
programming4us programming4us