Hi,
I am getting something else now :
Select A File:
Warning: Cannot modify header information - headers already sent by (output started at /home/wwww3/public_html/accueilfr/Support/manuels.php:28) in /home/wwww3/public_html/accueilfr/Support/manuels.php on line 30
New user manual Ned1.pdf MIBN.pdf MV120E.pdf J125.pdfNumber of files -- 4
Here is the latest code :
<?
function select_menu()
{
echo "<select name=\"myfiles\">\r";
$style = opendir("/home/wwww3/public_html/accueilfr/Support/manuels/");
while(false !== ($stylesheet = readdir($style)))
{
// this will check for a ".PDF" extension in the filename
if(preg_match("/.PDF/i", $stylesheet))
// if(preg_match("/PDF/i", $style))
{
echo "<option value=\"$stylesheet\">$stylesheet</option>\r";
$count++;
}
}
echo "</select>";
closedir($style);
echo "Number of files -- $count";
}
// HTML Form here:
if ($POST[myfiles])
echo "<form method=\"POST\" action=\"$SERVER[PHP_SELF]\">\r";
echo "Select A File: ";
//{
Header ("/home/wwww3/public_html/accueilfr/Support/manuels/$_POST[myfiles]");
//}
select_menu();
echo "<input type=\"submit\" name=\"submit\" value=\"Submit\">\r";
echo "</form>\r";
?>
Any other ideas ? Thanks for all the help.