formulaire pour remplir des ticket de panne
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
412 B

3 years ago
<?php
include '../session_restraintes.php';
$bdd = new PDO('mysql:host=localhost;dbname=ticket;charset:utf8', 'root', '');
$reponse = $bdd->query("SELECT DISTINCT * FROM `pannes`");
$stream = fopen('export/ticket.csv', 'w');
while($line = $reponse->fetch()) {
print_r($line);
echo '<br>';
fputcsv(
$stream, // file
$line, // arr
);
}
$reponse->closeCursor();
fclose($stream);
?>