Facebook
From Tiny Rhinoceros, 3 Years ago, written in PHP.
This paste is a reply to ref42.php from Perl Prairie Dog - view diff
Embed
Download Paste or View Raw
Hits: 110
  1. <?php
  2.  
  3. include '../Pdo_start.inc.php';
  4. $pdo = pdo_connexion('natels');
  5. $IdAbonnement = @filter_input(INPUT_GET, 'idAbo');
  6. $sql_prepare2 = "SELECT CONCAT(\"<img src='data:image/png;base64,\", `operateur`.`LogoOperateur`,\"' alt='Logo \",`NomOperateur`,\"'>\") AS 'Enseigne', `operateur`.`NomOperateur`, `abonnement`.`NomAbonnement`, `abonnement`.`PrixMensuel`, `abonnement`.`CentimesMinuteFixeCh`, `abonnement`.`CentimesMinuteMobileCh`, `abonnement`.`DonneesMoInclus`, `abonnement`.`ReserveMoins26Ans`, `abonnement`.`DownloadMbParSec`
  7. FROM `operateur`
  8.    LEFT JOIN `abonnement` ON `abonnement`.`OperateurId` = `operateur`.`idOperateur`  WHERE `abonnement`.`IdAbonnement` = :IdAbo ";
  9. $pdo_prepare2 = $pdo->prepare($sql_prepare2);
  10. $pdo_prepare2->bindValue(":IdAbo", $IdAbonnement);
  11. $pdo_prepare2->execute();
  12. $tab_prepare2 = $pdo_prepare2->fetchAll();
  13. //$pdo_prepare2->closeCursor();
  14.  
  15. $table = "";
  16. $table .= "<table><tr>";
  17. foreach ($tab_prepare2[0] as $key => $value) {
  18.     $table .="<th>$key</th>";            
  19. }
  20. $table .= "</tr>";
  21. for ($index = 0; $index < count($tab_prepare2); $index++) {
  22.     $table .= "<tr>";
  23.     foreach ($tab_prepare2[$index] as $key => $value) {
  24.         $table .= "<td>$value</td>";
  25.     }
  26.     $table .= "</tr>";
  27. }
  28. $table .= "</table>";
  29.  
  30.  
  31. ?>
  32. <!DOCTYPE html>
  33. <!--
  34. To change this license header, choose License Headers in Project Properties.
  35. To change this template file, choose Tools | Templates
  36. and open the template in the editor.
  37. -->
  38. <html>
  39.     <head>
  40.         <meta charset="UTF-8">
  41.         <title></title>
  42.         <style>
  43.             svg { width: 100px; height: 40px; }
  44.             table, td, th { border: 1px black solid; padding: 10px; border-collapse:collapse; }
  45.         </style>
  46.     </head>
  47.     <body>
  48.        
  49.         <form>
  50.             <h1>D'après votre consomamtion, voici les abonnements les plus favorables</h1>
  51.             <?= $table ?>
  52.         </form>
  53.                        
  54.            
  55.     </body>
  56. </html>

Replies to Re: ref43.php rss

Title Name Language When
prep1.php Big Goose php 3 Years ago.