Double affichage

Résolu
boni91 -  
 boni91 -
Bonjour a tous, j'ai deux choix d'image, ce que je voudrai faire c'est juste d'afficher l' image correspondant a l'id reçu.


if($id){

$audio = !empty($catalogue[$id]['audio']) ? $catalogue[$id]['audio'] : NULL;
$img = !empty($catalogue[$id]['img']) ? $catalogue[$id]['img'] : NULL;
$img2 = !empty($catalogue[$id]['img2']) ? $catalogue[$id]['img2'] : NULL;
$img3 = !empty($catalogue[$id]['img3']) ? $catalogue[$id]['img3'] : NULL;
$text = !empty($catalogue[$id]['text']) ? $catalogue[$id]['text'] : NULL;
$color = !empty($catalogue[$id]['color']) ? $catalogue[$id]['color'] : NULL;

echo '<img width="490" height="750"style=" margin:75px 0 0 25px;" src="' . $img .'" alt="">';
echo '<img width="850" height="550"style=" margin:75px 0 0 25px;" src="' . $img3 .'" alt="">';


merci d'avance

12 réponses

  1. yg_be Messages postés 23437 Date d'inscription   Statut Contributeur Dernière intervention   Ambassadeur 1 588
     
    bonjour, ton code fait-il autre chose que ce que tu souhaites obtenir?
    quelle est la structure de $catalogue? partage peut-être ce qu'affiche
    var_dump($catalogue);
    0
  2. boni91
     
    merci pour ton aide, je veux soit $img ou $img3 suivant l'envoie de l id

    array (size=14)
    'son' =>
    array (size=6)
    'audio' => string '../mp3/page21.mp3' (length=17)
    'img' => string '../img-audio-1/L1-21.png' (length=24)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '' (length=0)
    'text' => string '<b>1 - page 21</b> - TP Métiers' (length=32)
    'color' => string '#d5b88a' (length=7)
    'son_2' =>
    array (size=6)
    'audio' => string '../mp3/page29.mp3' (length=17)
    'img' => string '' (length=0)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '../img/livre_1.jpg' (length=18)
    'text' => string '<b>1 - page 29</b> - Messages' (length=29)
    'color' => string '#d5b88a' (length=7)
    'son_3' =>
    array (size=6)
    'audio' => string '../mp3/page35.mp3' (length=17)
    'img' => string '' (length=0)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '../img/livre_1.jpg' (length=18)
    'text' => string '<b>1 - page 35</b> - Discrimination [o] [u] [ou]' (length=48)
    'color' => string '#99e3df' (length=7)
    'son_4' =>
    array (size=6)
    'audio' => string '../mp3/page36.mp3' (length=17)
    'img' => string '' (length=0)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '../img/livre_1.jpg' (length=18)
    'text' => string '<b>1 - page 36</b> - Messages ou' (length=32)
    'color' => string '#99e3df' (length=7)
    'son_5' =>
    array (size=6)
    'audio' => string '../mp3/page39.mp3' (length=17)
    'img' => string '../img-audio-1/L1-39.png' (length=24)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '' (length=0)
    'text' => string '<b>1 - page 39</b> - TP ou' (length=26)
    'color' => string '#fc8aaf' (length=7)
    'son_6' =>
    array (size=6)
    'audio' => string '../mp3/page42.mp3' (length=17)
    'img' => string '' (length=0)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '../img/livre_1.jpg' (length=18)
    'text' => string '<b>1 - page 42</b> - Message o / au / eau' (length=41)
    'color' => string '#fc8aaf' (length=7)
    'son_7' =>
    array (size=6)
    'audio' => string '../mp3/page47.mp3' (length=17)
    'img' => string '../img-audio-1/L1-47.png' (length=24)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '' (length=0)
    'text' => string '<b>1 - page 47</b> - TP o / au / eau' (length=36)
    'color' => string '#cd9dbe' (length=7)
    'son_8' =>
    array (size=6)
    'audio' => string '../mp3/page53.mp3' (length=17)
    'img' => string '' (length=0)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '../img/livre_1.jpg' (length=18)
    'text' => string '<b>1 - page 53</b> - Message oi' (length=31)
    'color' => string '#cd9dbe' (length=7)
    'son_9' =>
    array (size=6)
    'audio' => string '../mp3/page54.mp3' (length=17)
    'img' => string '' (length=0)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '../img/livre_1.jpg' (length=18)
    'text' => string '<b>1 - page 54</b> - Discrimination [ou][a][wa]' (length=47)
    'color' => string '#cd9dbe' (length=7)
    'son_10' =>
    array (size=6)
    'audio' => string '../mp3/page57.mp3' (length=17)
    'img' => string '../img-audio-1/L1-57.png' (length=24)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '' (length=0)
    'text' => string '<b>1 - page 57</b> - TP oi' (length=26)
    'color' => string '#f3979f' (length=7)
    'son_11' =>
    array (size=6)
    'audio' => string '../mp3/page59.mp3' (length=17)
    'img' => string '' (length=0)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '../img/livre_1.jpg' (length=18)
    'text' => string '<b>1 - page 59</b> - Discrimination [ou][a][wa]' (length=47)
    'color' => string '#bae3a1' (length=7)
    'son_12' =>
    array (size=6)
    'audio' => string '../mp3/page64.mp3' (length=17)
    'img' => string '' (length=0)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '../img/livre_1.jpg' (length=18)
    'text' => string '<b>1 - page 64</b> - Lecture c / k / qu' (length=40)
    'color' => string '#bae3a1' (length=7)
    'son_13' =>
    array (size=6)
    'audio' => string '../mp3/page69.mp3' (length=17)
    'img' => string '../img-audio-1/L1-69.png' (length=24)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '' (length=0)
    'text' => string '<b>1 - page 69</b> - TP c / k / qu' (length=35)
    'color' => string '#e2e282' (length=7)
    'son_14' =>
    array (size=6)
    'audio' => string '../mp3/page79.mp3' (length=17)
    'img' => string '../img-audio-1/L1-79.png' (length=24)
    'img2' => string '../btn/haut-parleur1.png' (length=24)
    'img3' => string '' (length=0)
    'text' => string '<b>1 - page 79</b> - TP ch' (length=26)
    'color' => string '#96d0e3' (length=7)
    0
    1. yg_be Messages postés 23437 Date d'inscription   Statut Contributeur Dernière intervention   1 588
       
      je vois, et je suggère ceci:
      if strlen($img) >0 {
      	echo '<img width="490" height="750"style=" margin:75px 0 0 25px;" src="' . $img .'" alt="">';  
      }
      if strlen($img3) > 0 {
      	echo '<img width="850" height="550"style=" margin:75px 0 0 25px;" src="' . $img3 .'" alt="">';
      }
      0
      1. yg_be Messages postés 23437 Date d'inscription   Statut Contributeur Dernière intervention   1 588 > yg_be Messages postés 23437 Date d'inscription   Statut Contributeur Dernière intervention  
         
        qu'en penses-tu, boni91?
        0
  3. boni91
     
    merci a toi pour la réponse, peut tu m'expliquer ce code, j'essaye de comprendre car ça fait longtemps que je n ais pas coder, par contre on m'avais dit qu'on ne pouvais pas mettre plusieurs conditions if d'affiler.
    0
    1. yg_be Messages postés 23437 Date d'inscription   Statut Contributeur Dernière intervention   1 588
       
      avant d'expliquer, j'aimerais savoir si cela fonctionne.
      0
  4. boni91
     
    non malheureusement je l'ais vu que ce matin et je suis au taf, j'essayerai ce soir.
    0
  5. Vous n’avez pas trouvé la réponse que vous recherchez ?

    Posez votre question
  6. BONI91
     
    bonsoir, voici le message d'erreur que ça me fait, Parse error: syntax error, unexpected 'strlen' (T_STRING), expecting '(' in D:\wamp2\www\project_val_bis\page_principal\lecteur-audio.php on line 124.
    0
    1. jordane45 Messages postés 30427 Date d'inscription   Statut Modérateur Dernière intervention   4 831
       
      Bonjour,

      if (strlen($img) > 0) {
      


      if (strlen($img3) > 0) {
      
      0
  7. BONI91
     
    jordane45 t’ai trop fort merci, par contre est ce que je peut te demander encore de l'aide, car j'ai toujours se problème de permettre a l'utilisateur de telecharger le son, mon premier post, mon url ne donne rien et je ne voit pas ce que je peut faire de plus.

    localhost/project_val_bis/page_principal/lecteur-audio.php?id=son_43/mp3/../mp3/page115.

    voici le chemin complet, alors je me pose la question que c' est peut etre wampp qui block.
    0
  8. BONI91
     
    l'image et le bouton telecharger ne s'affiche plus pourquoi?

    	
    echo'<figure style="display:inline-block;border:none;padding:1px;">';
    if (strlen($img) > 0) {
    echo '<img width="390" height="580" style="margin:55px 0 60px 250px;" src="' . $img .'" alt="">';
    }if (strlen($img1) > 0) {
    echo '<img width="960" height="800" style="margin:55px 0 0 -280px;" src="' . $img1 .'" alt="">';
    }
    echo'</figure>';

    echo'<audio style="display:inline-block;margin-left:0;margin-bottom:80px;margin-top:-50px;" controls preload="auto">';
    echo'<source src="'. $audio1 .'" type="audio/mp3"/>';
    echo'<source src="'. $audio2 .'" type="audio/mp3"/>';
    echo'<source src="'. $audio3 .'" type="audio/mp3"/>';
    echo'<source src="'. $audio4 .'" type="audio/mp3"/>';
    echo'</audio>';

    echo'<div style="margin-left:850px; margin-top:40px; margin-bottom:10px;">';
    if (strlen($url) > 0) {

    echo'<a href="'.$url.'" download><img style="width="76"; height="76" src="../img/bouton-telecharger.png"></a>';
    }
    echo'</div>';

    echo'<div style="float:left;width:150px; height:80px; margin:-65px 0 0 710px;">';
    echo'<a style="padding:1em 1.5em .7em 1.5em;border:1px solid #000;text-decoration:none;background:#fff;font-family:notoserif;font-weight:bold;color:#000;" href="http://s642262600.onlinehome.fr//index.php?img=..%2Fimg%2Flivre_1.jpg&prix=18.90&livre_1=ACHETER" >ACHETER</a>';
    echo'</div>';

    }else{
    echo "Catalogue inconnu !";
    }

    ?>
    0
    1. yg_be Messages postés 23437 Date d'inscription   Statut Contributeur Dernière intervention   1 588
       
      partage le code source html de ta page.
      0
  9. boni91
     
    voici le code source,

    <!doctype html>
    <html lang="fr">
    <head>
    <title>françaispouradulte
    </title>
    <!------------------------------balises-meta--------------------------------->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Bandes sons Au boulot ! livre 1 et livre 2 – le français pour adultes – Valérie <b>VERMURIE</b>">
    <!-----------------------------styles-css------------------------------------>
    <link rel="stylesheet" href="../css/style.css" media="all">
    <link rel="stylesheet" href="../css/style_exo_1.css" media="all">
    <link rel="stylesheet" href="../css/contact.css" media="all">
    <link rel="stylesheet" href="../css/normalize.css" media="all">
    <link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/animate.css" />
    <link rel="icon" type="image/png" href="../favicon.png" />
    <link rel="apple-touch-icon" sizes="120x120" href="../apple-touch-icon-120x120-precomposed.png" /> <link rel="apple-touch-icon" sizes="152x152" href="../apple-touch-icon-152x152-precomposed.png" />
    <!-----------------------------styles-font----------------------------------->
    <link href='https://fonts.googleapis.com/css?family=Kreon:400,700,300' rel='stylesheet' type='text/css'>
    <!-----------------------------script_js----------------------------------->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">
    </script>
    <script src="jquery.js"></script>
    <script src="audioplayer.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
    <script src="audiojs/audio.min.js"></script>
    <!--[if IE9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <style>

    img{

    float:left;

    }

    </style>
    </head>
    <body>
    <div id="wrapper">
    <header class="header_color">
    <div id="header_logo">
    <img src="../img/logo.png" alt="logo_francais_pour_adultes" />
    </div>
    <nav class="nav_right">
    <li>
    <a href="../index.php" title="accueil">ACCUEIL
    </a>
    </li>
    <li>
    <a href="../page_principal/exercices.php" title="exercices">EXERCICES
    </a>
    </li>
    <li>
    <a href="../page_principal/livres.php" title="livres">LIVRES
    </a>
    </li>
    <li>
    <a href="../page_principal/audio.php" style="color:#54d1cd;" title="audio">AUDIO
    </a>
    </li>
    <li>
    <a href="../page_principal/contact.php" title="contact">CONTACT
    </a>
    </div>

    </header>
    <div id="content">
    <br />
    <div class="container">
    <section class="post text_desc">

    <figure style="display:inline-block;border:none;padding:1px;"></figure><audio style="display:inline-block;margin-left:0;margin-bottom:80px;margin-top:-50px;" controls preload="auto"><source src="" type="audio/mp3"/><source src="" type="audio/mp3"/><source src="../mp3/page42.mp3" type="audio/mp3"/><source src="" type="audio/mp3"/></audio><div style="margin-left:850px; margin-top:40px; margin-bottom:10px;"></div><div style="float:left;width:150px; height:80px; margin:-65px 0 0 710px;"><a style="padding:1em 1.5em .7em 1.5em;border:1px solid #000;text-decoration:none;background:#fff;font-family:notoserif;font-weight:bold;color:#000;" href="http://s642262600.onlinehome.fr//index.php?img=..%2Fimg%2Flivre_1.jpg&prix=18.90&livre_1=ACHETER" >ACHETER</a></div> </section>
    </div>

    </div>
    <!--------------content------>
    <footer class="footer_color">
    <div class="info_left foot_info_left">
    <p>Réalisation du site internet:
    <a style="font-size:1.3em;" href="../page_principal/contact_nills.php">Nilsweb
    </a>
    </p>
    <p>&copy - Le français pour adultes - 2016 - Tous droits réservés.
    </p>
    </div>
    <div class="info_left foot_info_right">
    <li class="info-border">
    <a href="contact.php">contact
    </a>
    </li>
    <li class="info-border">
    <a href="../page_principal/mention.php">Mention légales / Condition générales de ventes
    </a>
    </li>
    </div>
    </footer>
    </div>
    <!--------------wrapper------>
    <script src="js/viewportchecker.js">
    </script>
    <script type="text/javascript">
    jQuery(document).ready(function() {
    jQuery('.post').addClass("hidden").viewportChecker({
    classToAdd: 'visible animated fadeInDown', // Class to add to the elements when they are visible
    offset: 100
    }
    );
    }
    );
    </script>
    <script type="text/javascript">
    $(function() {
    $('a[href=#header]').click(function(){
    $('html').animate({
    scrollTop:0}
    , 'slow');
    return false;
    }
    );
    }
    );
    </script>
    <script type="text/javascript">
    var vid = document.getElementById("audio");
    function playVid(id) {
    var vid = document.getElementById(id);
    vid.play(id);
    }
    function pauseVid() {
    vid.pause();
    }
    </script>
    <script type="text/javascript">
    var vid = document.getElementById("son");
    function playVid(id) {
    var vid = document.getElementById(id);
    vid.play(id);
    }
    function pauseVid() {
    vid.pause();
    }
    </script>
    <script type="text/javascript">
    var vid = document.getElementById("son_1");
    function playVid(id) {
    var vid = document.getElementById(id);
    vid.play(id);
    }
    function pauseVid() {
    vid.pause();
    }
    </script>
    <script type="text/javascript">
    var vid = document.getElementById("son_2");
    function playVid(id) {
    var vid = document.getElementById(id);
    vid.play(id);
    }
    function pauseVid() {
    vid.pause();
    }
    </script>
    <script type="text/javascript">
    var vid = document.getElementById("son_3");
    function playVid(id) {
    var vid = document.getElementById(id);
    vid.play(id);
    }
    function pauseVid() {
    vid.pause();
    }
    </script>
    <script type="text/javascript">
    var vid = document.getElementById("son_4");
    function playVid(id) {
    var vid = document.getElementById(id);
    vid.play(id);
    }
    function pauseVid() {
    vid.pause();
    }
    </script>
    </body>
    </html>

    et un bout du tableau

    	$secondcatalogue_1 = array(
    'son_40'=>array(
    'audio2' => '../mp3_1/page70.mp3',
    'img' => '../img/livre_2.jpg',
    'img2' => '../btn/haut-parleur1.png',
    'img1' => '',
    'text' => '<b>15 - page 70</b> - Message é / et / er / ez',
    'color'=>'#99e3df',
    'url' => 'localhost/project_val_bis/page_principal/lecteur-audio.php?id=son_43/mp3/../mp3/page70.'

    ),
    'son_41' => array(
    'audio2' => '../mp3_1/page74.mp3',
    'img' => '../img/livre_2.jpg',
    'img2' => '../btn/haut-parleur1.png',
    'img1' => '',
    'text' => '<b>16 - page 74</b> - TP é / et / er / ez ',
    'color'=>'#99e3df',
    'url' => 'localhost/project_val_bis/page_principal/lecteur-audio.php?id=son_43/mp3/../mp3/page74.'
    ),


    merci pour votre aide
    0
  10. boni91
     
    desoler je me sui trompé sur le code source,

    	<?php

    error_reporting(E_ALL);
    ini_set('display_errors', TRUE);
    ini_set('display_startup_errors', TRUE);

    require_once "../inc/inc_catalogue.php";

    require_once "../inc/inc_secondcatalogue.php";

    $id = !empty($_GET['id']) ? $_GET['id'] : NULL;

    if($id){

    $audio3 = !empty($catalogue[$id]['audio3']) ? $catalogue[$id]['audio3'] : NULL;
    $img = !empty($catalogue[$id]['img']) ? $catalogue[$id]['img'] : NULL;
    $img2 = !empty($catalogue[$id]['img2']) ? $catalogue[$id]['img2'] : NULL;
    $img1 = !empty($catalogue[$id]['img1']) ? $catalogue[$id]['img1'] : NULL;
    $text = !empty($catalogue[$id]['text']) ? $catalogue[$id]['text'] : NULL;
    $color = !empty($catalogue[$id]['color']) ? $catalogue[$id]['color'] : NULL;
    $url = !empty($catalogue[$id]['url']) ? $catalogue[$id]['url'] : NULL;

    $audio4 = !empty($catalogue_1[$id]['audio4']) ? $catalogue_1[$id]['audio4'] : NULL;
    $img = !empty($catalogue_1[$id]['img']) ? $catalogue_1[$id]['img'] : NULL;
    $img2 = !empty($catalogue_1[$id]['img2']) ? $catalogue_1[$id]['img2'] : NULL;
    $img1 = !empty($catalogue_1[$id]['img1']) ? $catalogue_1[$id]['img1'] : NULL;
    $text = !empty($catalogue_[$id]['text']) ? $catalogue_[$id]['text'] : NULL;
    $color = !empty($catalogue_1[$id]['color']) ? $catalogue_1[$id]['color'] : NULL;
    $url = !empty($catalogue_1[$id]['url']) ? $catalogue_1[$id]['url'] : NULL;

    $audio1 = !empty($secondcatalogue[$id]['audio1']) ? $secondcatalogue[$id]['audio1'] : NULL;
    $img = !empty($secondcatalogue[$id]['img']) ? $secondcatalogue[$id]['img'] : NULL;
    $img2 = !empty($secondcatalogue[$id]['img2']) ? $secondcatalogue[$id]['img2'] : NULL;
    $img1 = !empty($secondcatalogue[$id]['img1']) ? $secondcatalogue[$id]['img1'] : NULL;
    $text = !empty($secondcatalogue[$id]['text']) ? $secondcatalogue[$id]['text'] : NULL;
    $color = !empty($secondcatalogue[$id]['color']) ? $secondcatalogue[$id]['color'] : NULL;
    $url = !empty($secondcatalogue[$id]['url']) ? $secondcatalogue[$id]['url'] : NULL;

    $audio2 = !empty($secondcatalogue_1[$id]['audio2']) ? $secondcatalogue_1[$id]['audio2'] : NULL;
    $img = !empty($secondcatalogue_1[$id]['img']) ? $secondcatalogue_1[$id]['img'] : NULL;
    $img2 = !empty($secondcatalogue_1[$id]['img2']) ? $secondcatalogue_1[$id]['img2'] : NULL;
    $img1 = !empty($secondcatalogue_1[$id]['img1']) ? $secondcatalogue_1[$id]['img1'] : NULL;
    $text = !empty($secondcatalogue_[$id]['text']) ? $secondcatalogue_[$id]['text'] : NULL;
    $color = !empty($secondcatalogue_1[$id]['color']) ? $secondcatalogue_1[$id]['color'] : NULL;
    $url = !empty($secondcatalogue_1[$id]['url']) ? $secondcatalogue_1[$id]['url'] : NULL;

    echo'<figure style="display:inline-block;border:none;padding:1px;">';
    if (strlen($img) > 0) {
    echo '<img width="390" height="580" style="margin:55px 0 60px 250px;" src="' . $img .'" alt="">';
    }if (strlen($img1) > 0) {
    echo '<img width="960" height="800" style="margin:55px 0 0 -280px;" src="' . $img1 .'" alt="">';
    }
    echo'</figure>';

    echo'<audio style="display:inline-block;margin-left:0;margin-bottom:80px;margin-top:-50px;" controls preload="auto">';
    echo'<source src="'. $audio1 .'" type="audio/mp3"/>';
    echo'<source src="'. $audio2 .'" type="audio/mp3"/>';
    echo'<source src="'. $audio3 .'" type="audio/mp3"/>';
    echo'<source src="'. $audio4 .'" type="audio/mp3"/>';
    echo'</audio>';

    echo'<div style="margin-left:850px; margin-top:40px; margin-bottom:10px;">';
    if (strlen($url) > 0) {

    echo'<a href="'.$url.'" download><img style="width="76"; height="76" src="../img/bouton-telecharger.png"></a>';
    }
    echo'</div>';

    echo'<div style="float:left;width:150px; height:80px; margin:-65px 0 0 710px;">';
    echo'<a style="padding:1em 1.5em .7em 1.5em;border:1px solid #000;text-decoration:none;background:#fff;font-family:notoserif;font-weight:bold;color:#000;" href="http://s642262600.onlinehome.fr//index.php?img=..%2Fimg%2Flivre_1.jpg&prix=18.90&livre_1=ACHETER" >ACHETER</a>';
    echo'</div>';

    }else{
    echo "Catalogue inconnu !";
    }

    ?>
    </section>
    </div>

    voici le bon
    0
  11. boni91
     
    bonsoir, j' ai un souci d'affichage avec une image et un bouton telecharger, je pense que la condition if ne passe pas, qu'en pensez vous?

    	echo'<figure style="display:inline-block;border:none;padding:1px;">';
    if (strlen($img) > 0) {
    echo '<img width="390" height="580" style="margin:55px 0 60px 250px;" src="' . $img .'" alt="">';
    }if (strlen($img1) > 0) {
    echo '<img width="960" height="800" style="margin:55px 0 0 -280px;" src="' . $img1 .'" alt="">';
    }
    echo'</figure>';

    echo'<audio style="display:inline-block;margin-left:0;margin-bottom:80px;margin-top:-50px;" controls preload="auto">';
    echo'<source src="'. $audio1 .'" type="audio/mp3"/>';
    echo'<source src="'. $audio2 .'" type="audio/mp3"/>';
    echo'<source src="'. $audio3 .'" type="audio/mp3"/>';
    echo'<source src="'. $audio4 .'" type="audio/mp3"/>';
    echo'</audio>';

    echo'<div style="margin-left:850px; margin-top:40px; margin-bottom:10px;">';
    if (strlen($url) > 0) {

    echo'<a href="'.$url.'" download><img style="width="76"; height="76" src="../img/bouton-telecharger.png"></a>';
    }
    echo'</div>';
    0
    1. yg_be Messages postés 23437 Date d'inscription   Statut Contributeur Dernière intervention   1 588
       
      tu peux voir ceci dans ta source html:
      <figure style="display:inline-block;border:none;padding:1px;"></figure>

      donc on dirait que $img et $img1 sont vides. ainsi que $url.
      0
  12. boni91
     
    bonjour je m'en suis aperçu et corriger, maintenant plus de souci et je vous remercie pour votre aide précieuse.
    par contre comment fait on pour fermer ce post
    0
    1. yg_be Messages postés 23437 Date d'inscription   Statut Contributeur Dernière intervention   1 588
       
      comme tu n'es apparemment pas enregistré sur le site, je ne sais pas comment tu peux fermer ce post. je le ferme pour toi.
      0