I have to deliver pdf files content to my users (all files indexed in a mysql Dπ
The 1st form allows the user to select the document type & number (POST method)
It then calls the the query result page that is displayed as a table : each line contains the document name and a link to the pdf like thisπI'm paging through the records to display e.g 10 records per page if necessary)
print("<FORM METHOD=\"post\" style=\"margin-bottom:0\" action=\"uploadtest4.php\" target=\"_blank\">");
print ("<font face=\"Verdana\"><input type=\"hidden\" name=\"SITENAME\" value=$SITENAME>");
print("<input type=\"hidden\" name=\"context\" value=$result[name].pdf>");
print ("<INPUT TYPE=\"image\" src=\"pdf.gif\" size=\"14\ maxlength=\"14\" border=\"0\" ENCTYPE=\"multipart/form-data\" ");
print (" target=\"_blank\" ><input type=\"hidden\" name=\"target\" value=\"_blank\"></left></font></form></td>");
print "</tr>";
uploadtest4.php is used to display the pdf using the following method after I copied the doc to a temp directory:
$fd=fopen($dest,"rb");
fpassthru($fd);
fclose($fd);
Problem 1:
I want to display the pdf in a new window.
OK for the records on the first page of results, but does not work if I need to go to another result pages
Problem 2:
After having diplayed a pdf, if I select an other option in my main menu, I get the following:
Method Not Allowed
The requested method POST is not allowed for the URL /eng/spec/flow.htm
ok after a page refresh or if I select on other menu option
Running on NT4, PHP4.0.6, Apache 1.3.22
Any help much apreciated.
Thanks