<?php
session_start();
ob_start();
$user = $_SESSION["user_id"];
$mycar = $_REQUEST['J'];
$myJPG ="";
if (!isset($_SESSION["user_id"])) {    header("location:../logout.php");}
include "../actions/dbPDO.php";

    $myLic = $db->prepare('SELECT lic_photo from cars where carid = ? ');
							$myLic->bindParam(1,$mycar);
							$myLic->execute();
        if($myLic->rowCount()>0){$row = $myLic->fetch(PDO::FETCH_ASSOC);
                $myJPG = $row["lic_photo"];}

$myJPG = "../photo/car_lic/".$myJPG;

?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>print</title>
    <link rel="stylesheet" href="css/print.css">
  </head>
  <body>
      <page size="A4">
        <div class="row">
        <img  src="<?php echo $myJPG; ?>" alt="صورة الرخصة غير متاحة"  >
        </div>
      </page>
  </body>
</html>
