In any application, create a PhP button.
Within the button place codes:
[field_id] = {field_id};
[field_name_doc]={docname};
[field_name_file]={filename};
sc_redir(blank_2);
Put the globals variables in "Out" mode.
Create a blank application:
Put the code below in the OnExecut Event:
//content that appears in the word document
$content = 'doc Id: '.[field_id].'doc name: '.[field_name_doc];
//doc type
$file_name=[field_name_file].".doc";
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-type: application/msword");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=".$file_name);
header("Content-Transfer-Encoding: binary ");
echo $content;
When you run the application:
Ronyan Alves
Comments