0
<?php
require_once 'library/config.php';
require_once 'library/functions.php';

if(isset($_SESSION['sql_view']))
{
 $sql_view=$_SESSION['sql_view'];
$result = dbQuery($sql_view);
extract(dbFetchAssoc($result)); 
}else
{
//header('Location: index.php');
}
  
$FileName ="view.doc"; 
header('Content-Type: application/word; name="word"');
header('Content-Disposition: attachment; filename="' . $FileName . '"');
header('Content-Type: application/word;');

?>
<!--<form id="frmSample" name="frmSample" method="post" action="" enctype="multipart/form-data" onsubmit="return ValidateForm()" >-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  
 <tr>
    <td width="11%"></td>
    <td >Details</td>
<td width="85%" >      </td>
    </tr>
    <tr>
    <td></td>
    <td ></td>
<td >
      </td>
    </tr> 
  
  
  <tr>
    <td>Name</td>
    <td width="4%">:</td>
<td ><?=$familyName?>
                    <?=$firstName?>
                    <?=$lastName?>
      </td>
    </tr>
  <tr>
    <td>Father Name</td>
    <td>:</td>
    <td ><?=$familyName1?>
                    <?=$firstName1?>
                    <?=$lastName1?></td>
    </tr>
  
  <tr>
    <td>No. of Siblings</td>
    <td>:</td>
    <td ><?=$Nosibling?>
Sister/s
                    <?=$sibling?>
Brother/s</td>
    </tr>
  
  <tr>
    <td>Date of Birth</td>
    <td>:</td>
    <td ><?=$dob?>
</td>
    </tr>
    
 <tr>
    <td>Age</td>
    <td>:</td>
    <td ><?=$age?></td>
    </tr>
  
    <tr>
      <td>Education</td>
      <td>:</td>
      <td >
             <?=$education?>      </td>
    </tr>
      <tr>      
      <td >Sex</td>
      <td>:</td>
      <td >
       
           <?=$sex?>            </td>
    </tr>
   
    <tr>
      <td>Kuladeva</td>
      <td>:</td>
      <td><?=$kuldevata?></td>      
    
    
    <tr>
      <td>Nakshatra</td>
      <td>:</td>
      <td>
         <?=$nakshtra?>		
        </td>
        </tr>
      <tr>      
      <td>Gotra</td>
      <td>:</td>
      <td>
      <?=$gotra?>
		</td>
    </tr>
   
    <tr>
      <td>Height</td>
      <td>:</td>
      <td><?=$height?>
      cms</td>
      </tr>
      <tr>
      <td>Weight</td>
      <td>:</td>
      <td><?=$weight?>
      kgs</td>
    </tr>
    
    <tr>
      <td>Other Details</td>
      <td>:</td>
      <td><?=$other?></td>     
    </tr> 
    <tr>
      <td>Phone</td>
      <td>:</td>
      <td ><?=$phone?></td>
    </tr> 
    <tr>
      <td>Mobile</td>
      <td>:</td>
      <td><?=$mobile?></td>
     
    </tr> 
    <tr>
      <td >Address</td>
      <td>:</td>
      <td ><?=$adress?></td>
     
    </tr>    
   
    <tr>
      <td>Gmail Id</td>
      <td>:</td>
      <td ><?=$gmailId?>
       
      </td>
      </tr>
   
    <tr>
      <td>facebook Id </td>
      <td>:</td>
      <td><?=$facebookId?></td>
     
    </tr>  
  </table>

please give solution to download file in pdf format....

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by jogesh_p
0

for the pdf file you have to use

header('Content-disposition: attachment; filename=filename.pdf');
header('Content-type: application/pdf');
readfile('filename.pdf');

Edited by jogesh_p: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.