j'ai a peu prés trouver :
1 2
| <div align="left"><label for="prenom">Prénom:</label>
<input type="text" name="prenom" id="prenom" /></div> |
et en php
<p><strong>Prenom:<?php $prenom=$_POST['prenom'];?></strong></p>
mais il doit manquer un truc car cela me fait des erreurs sur mon pdf et ne s'exporte pas
si jamais sa peut vous aidez le code entier de la page php:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
| <?php
$data = serialize(file_get_contents('../index.html'));;
ob_start();
?>
<style type="text/css">
.header{
display: block;
height:70px;
background: #999 url(../images/logo.png) 5px 5px no-repeat;
padding:10px 10px 10px 100px;
}
.header p{
margin:0;
color:#fff;
}
.footer p{
margin:0;
font-size:12px;
color:#000;
}
.footer hr{
margin-bottom: 10px;
color:#999;
}
h4{
text-align: right;
}
h1{
text-transform: uppercase;
font-size:22px;
text-align: center;
color: #000;
}
.client{
margin-left: 5px;
margin-right: 400px;
padding: 10px;
border:1px dotted #999;
}
.client p{
margin: 0;
text-align: left;
}
</style>
<page backtop="60mm" backleft="10mm" backright="10mm">
<page_header>
<div class='header'>
<p><strong><h1>SERVICE APRES-VENTE - PRISE EN CHARGE</h1></strong></p>
</div>
<h4>Date de prise en charge:<?php echo date('d M Y'); ?></h4>
</page_header>
<page_footer>
<div class='footer'>
<hr/>
<p>Signature du client:</p>
</div>
</page_footer>
<div class='client'>
<h3>Client</h3>
<p><strong>Prenom:<?php $prenom=$_POST['prenom'];?></strong></p>
<p><strong>Nom:<?php $nom=$_POST['nom'];?></strong></p>
<p><strong>Société: <?php $societe=$_POST['societe'];?></strong></p>
<p><strong>Email:<?php $email=$_POST['email'];?></strong></p>
<p><strong>Tel: <?php $telephone=$_POST['telephone'];?> </strong></p>
</div>
</page>
<?php
$content= ob_get_clean();
require('../html2pdf/html2pdf.class.php');
try{
$pdf = new HTML2PDF('P','A4','fr');
$pdf->pdf->SetDisplayMode('fullpage');
$pdf->writeHTML($content);
$pdf->Output('sav.pdf');
} catch(HTML2PDF_exception $e) {
echo $e->getMessage();
exit;
} |
Partager