IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PHP & Base de données Discussion :

Affichage d'une image issue d'une base


Sujet :

PHP & Base de données

  1. #1
    Membre du Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Décembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Boutique - Magasin

    Informations forums :
    Inscription : Décembre 2013
    Messages : 8
    Par défaut Affichage d'une image issue d'une base
    Bonjour à tous et à toutes, j'ai un super probleme.
    je conçoi un site web pour un proche, j'ai creer une base de donnés mysql dans laquelle j'ai directement insérer kelkes images en BLOB dans la base via l'interface de phpmyadmin
    a présent j'aimerais depuis la base, faire afficher l'image sur une page du site web #en html# je galère depuis car l'image ne s'affiche pas j'ai une croix rouge à la place de l'image#

    je vous donne les codes des pages concernés afin de déceler l'erreur#
    1/ pour la collecte des images dans la base

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <?php
    // connexion à la base de données:
    mysql_connect"localhost", "client", "password");
    mysql_select_db("base");
     
    // on récolte les données contenues dans la table:
    $requete = mysql_query ("SELECT img FROM image WHERE id='$id'");
    $data = mysql_fetch_array ($requete);
    $id = $data["id"];
    $img = $data["img"];
     
    header("content-type: image/jpeg");
    print "$img";
    ?>
    2/ le code à inserer dans la page où l'image doit s'afficher
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <?php print "<img src='fichier.php?id=6'/>";?>
    voila

    je compte sur votre aide.
    merci d'avance

  2. #2
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    C'est $_GET['id'] et non $id
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    // on récolte les données contenues dans la table:
    $requete = mysql_query ("SELECT img FROM image WHERE id=" . intval($_GET['id']);
    $data = mysql_fetch_array ($requete);
     
    header("content-type: image/jpeg");
    echo $data['img'];
    ?>
    De plus cette ligne
    n'a pas de sens puisque puisque $data['id'] provient d'une requête dont le critère est déjà $id ... tu tournes en rond.
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  3. #3
    Membre du Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Décembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Boutique - Magasin

    Informations forums :
    Inscription : Décembre 2013
    Messages : 8
    Par défaut
    Merci sabotage pour ton assistance, j'ai donc corrigé le code mais l'image n'affiche toujours pas est ce que tu pourrais me mettre le code corrigé en entier en te basant sur celui que j'ai posté , merci encore une fois pour tout

    Sabotage

    est ce que le code à inserer dans la page oû doit s'afficher l'image est aussi correct ???

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <?php print "<img src='fichier.php?id=6'/>";?>
    je rappel que le 6 est l'identifiant de l'image dans la base de donnée que je veux afficher

    merci

  4. #4
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    Enlève la ligne header() et essai d'accèder directement à http://tonserveur/fichier.php?id=6
    pour voir s'il y a des erreurs
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  5. #5
    Membre du Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Décembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Boutique - Magasin

    Informations forums :
    Inscription : Décembre 2013
    Messages : 8
    Par défaut
    excuse moi kan tu dis tonseveur tu parle de l'adresse de mon site c'est sa ???

    http://tonserveur/fichier.php?id=6

  6. #6
    Membre du Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Décembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Boutique - Magasin

    Informations forums :
    Inscription : Décembre 2013
    Messages : 8
    Par défaut
    kan j'enleve le header ()
    et que je vais sur http://monserveur/fichier.php?id=6'/

    il sa m'affiche


    PHP Error Message

    Parse error: syntax error, unexpected ';' in /home/a4231212/public_html/fichier.php on line 7

  7. #7
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    Si tu n'arrives pas a resoudre cette erreur de syntaxe (ce qui ne devrait pas être difficile), donne ton code actuel.
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  8. #8
    Membre du Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Décembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Boutique - Magasin

    Informations forums :
    Inscription : Décembre 2013
    Messages : 8
    Par défaut
    ok voici le code pour la page fichier.php qui collecte les images dans la table mysql

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    <?php
    // connexion à la base de données:
    mysql_connect("host", "ID", "mot de passe");
    mysql_select_db("nom de la base ici");
     
    // on récolte les données contenues dans la table:
    $requete = mysql_query ("SELECT img FROM  image WHERE id=" . intval($_GET['id']);
    $data = mysql_fetch_array ($requete);
     
     
    echo $data['img'];
     
    ?>
    et voici la page projets.php sur laquelle je souhaite faire afficher une image povenant de la base de données
    le code d'affichage de l'image est en rouge
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    <html>
    <head>
    <title>DOORS and STONES COMPANY</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
     
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
     
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
     
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    <style type="text/css">
    <!--
    .style1 {
    	font-family: DINPro-Bold;
    	font-size: 24px;
    	color: #FFFFFF;
    }
    .style2 {
    	font-family: DINPro-Bold;
    	font-size: 11px;
    	color: #333333;
    }
    -->
    </style>
    </head>
    <?
    mysql_connect("host", "ID", "mot de passe"); mysql_select_db("nom de la base ici"); $reponse = mysql_query ("SELECT * FROM image");  
     
      while ($donnees = mysql_fetch_array($reponse)) 
     
     
     {
     
    ?>
    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/index_04.png','images/index_08b.png','images/index_10b.png','images/index_06b.png')">
    <div align="center">
      <!-- ImageReady Slices (SDC_webdesign 1000.psd) -->
      <table id="Tableau_01" width="1001" height="1311" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td colspan="27"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1000" height="445">
            <param name="movie" value="images/header.swf">
            <param name="quality" value="high">
            <embed src="images/header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1000" height="445"></embed>
          </object></td>
          <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="445" alt=""></td>
        </tr>
        <tr>
          <td colspan="27">
            <img src="site 2/images/SDC_webdesign-1000_02.png" width="1000" height="5" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="5" alt=""></td>
        </tr>
        <tr>
          <td colspan="2" rowspan="3">
            <img src="site 2/images/SDC_webdesign-1000_03.png" width="154" height="687" alt=""></td>
    	    <td colspan="2"><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image131','','images/index_04.png',1)"><img src="images/index_04b.png" name="Image131" width="164" height="97" border="0"></a></td>
    	    <td>
    		    <img src="site 2/images/SDC_webdesign-1000_05.png" width="4" height="97" alt=""></td>
    	    <td colspan="3"><a href="conception.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image86','','images/index_06b.png',1)"><img src="images/index_06.png" name="Image86" width="161" height="97" border="0"></a></td>
    	    <td>
    		    <img src="site 2/images/SDC_webdesign-1000_07.png" width="4" height="97" alt=""></td>
    	    <td colspan="4"><a href="ostia.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image84','','images/index_08b.png',1)"><img src="images/index_08.png" name="Image84" width="160" height="97" border="0"></a></td>
    	    <td>
    		    <img src="site 2/images/SDC_webdesign-1000_09.png" width="5" height="97" alt=""></td>
    	    <td colspan="12"><a href="samsung.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image85','','images/index_10b.png',1)"></a> <a href="samsung.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image85','','images/index_10b.png',1)"><img src="images/index_10.png" name="Image85" width="164" height="97" border="0"></a></td>
    	    <td rowspan="13">
    		    <img src="site 2/images/SDC_webdesign-1000_11.png" width="184" height="860" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="97" alt=""></td>
        </tr>
        <tr>
          <td colspan="24"><table width="661" border="0">
            <tr>
              <td colspan="4" bgcolor="#F27937"><div align="left"><span class="style1">Derniers Projets </span></div></td>
              </tr>
     
            <tr>
              <td width="218"><div align="center"><span class="style2"></span><span class="style2">
     
    </span><?php echo "<img src='fichier.php?id=6'/>";?><br>
              </div></td>
              <td width="223"><div align="center" class="style2">
                <div align="center"><strong>im2 </strong></div>
              </div></td>
              <td colspan="2"><div align="center">im3</div></td>
              </tr>
     
            <tr>
              <td><div align="center"><span class="style2"><?php echo $donnees['text01'];?></span>
              </div>
                <div align="center"></div><div align="center"></div><div align="center"></div><div align="left"></div></td>
              <td><div align="center" class="style2"><?php echo $donnees['text02'];?></div></td>
              <td colspan="2"><div align="center" class="style2"><?php echo $donnees['text03'];?></div></td>
              </tr>
            <tr>
              <td><div align="center">im4</div></td>
              <td><div align="center">im5</div></td>
              <td colspan="2"><div align="center">im6</div></td>
              </tr>
     
            <tr>
              <td><div align="center" class="style2"><?php echo $donnees['text04'];?></div>
                <div align="left"></div><div align="left"></div></td>
              <td><div align="center" class="style2"><?php echo $donnees['text05'];?></div></td>
              <td colspan="2"><div align="center" class="style2"><?php echo $donnees['text06'];?></div></td>
              </tr>
     
            <tr>
              <td><div align="center">im7</div></td>
              <td><div align="center">im8</div></td>
              <td colspan="2"><div align="center">im9</div></td>
              </tr>
     
     
            <tr>
              <td><div align="center" class="style2"><?php echo $donnees['text07'];?></div></td>
              <td><div align="center" class="style2"><?php echo $donnees['text08'];?></div></td>
              <td colspan="2"><div align="center" class="style2"><?php echo $donnees['text09'];?></div></td>
              </tr>
            <? } ?>
     
          </table></td>
          <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="538" alt=""></td>
        </tr>
        <tr>
          <td colspan="24"><img src="site 2/images/SDC_webdesign-1000_13.png" width="662" height="52" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="52" alt=""></td>
        </tr>
        <tr>
          <td rowspan="10">
            <img src="site 2/images/SDC_webdesign-1000_14.png" width="150" height="173" alt=""></td>
    	    <td colspan="6">
    		    <a href="info@stoneanddoors.com"><img src="site 2/images/SDC_webdesign-1000_15.png" alt="" width="258" height="41" border="0"></a></td>
    	    <td colspan="19" rowspan="4">
    		    <img src="site 2/images/SDC_webdesign-1000_16.png" width="408" height="88" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="41" alt=""></td>
        </tr>
        <tr>
          <td colspan="2" rowspan="2">
            <img src="site 2/images/SDC_webdesign-1000_17.png" width="50" height="34" alt=""></td>
    	    <td colspan="3">
    		    <img src="site 2/images/SDC_webdesign-1000_18.png" width="148" height="9" alt=""></td>
    	    <td rowspan="2">
    		    <img src="site 2/images/SDC_webdesign-1000_19.png" width="60" height="34" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="9" alt=""></td>
        </tr>
        <tr>
          <td colspan="3">
            <img src="site 2/images/SDC_webdesign-1000_20.png" width="148" height="25" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="25" alt=""></td>
        </tr>
        <tr>
          <td colspan="6" rowspan="6">
            <img src="site 2/images/SDC_webdesign-1000_21.png" width="258" height="70" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="13" alt=""></td>
        </tr>
        <tr>
          <td colspan="12" rowspan="2">
            <img src="site 2/images/SDC_webdesign-1000_22.png" width="372" height="15" alt=""></td>
    	    <td colspan="2">
    		    <a href="facebook.com" target="_blank"><img src="site 2/images/SDC_webdesign-1000_23.png" alt="" width="14" height="13" border="0"></a></td>
    	    <td rowspan="2">
    		    <img src="site 2/images/SDC_webdesign-1000_24.png" width="4" height="15" alt=""></td>
    	    <td rowspan="2">
    		    <img src="site 2/images/SDC_webdesign-1000_25.png" width="1" height="15" alt=""></td>
    	    <td colspan="2" rowspan="2">
    		    <a href="rss.com" target="_blank"><img src="site 2/images/SDC_webdesign-1000_26.png" alt="" width="15" height="15" border="0"></a></td>
    	    <td rowspan="3">
    		    <img src="site 2/images/SDC_webdesign-1000_27.png" width="2" height="25" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="13" alt=""></td>
        </tr>
        <tr>
          <td>
            <img src="site 2/images/SDC_webdesign-1000_28.png" width="13" height="2" alt=""></td>
    	    <td>
    		    <img src="site 2/images/SDC_webdesign-1000_29.png" width="1" height="2" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="2" alt=""></td>
        </tr>
        <tr>
          <td colspan="11">
            <img src="site 2/images/SDC_webdesign-1000_30.png" width="341" height="10" alt=""></td>
    	    <td colspan="6" rowspan="2">
    		    <a href="samsung.html"><img src="site 2/images/SDC_webdesign-1000_31.png" alt="" width="64" height="28" border="0"></a></td>
    	    <td>
    		    <img src="site 2/images/SDC_webdesign-1000_32.png" width="1" height="10" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="10" alt=""></td>
        </tr>
        <tr>
          <td colspan="3" rowspan="3">
            <img src="site 2/images/SDC_webdesign-1000_33.png" width="127" height="60" alt=""></td>
    	    <td rowspan="2">
    		    <img src="site 2/images/SDC_webdesign-1000_34.png" width="18" height="32" alt=""></td>
    	    <td>
    		    <a href="index.html"><img src="site 2/images/SDC_webdesign-1000_35.png" alt="" width="58" height="18" border="0"></a></td>
    	    <td colspan="3">
    		    <a href="conception.html"><img src="site 2/images/SDC_webdesign-1000_36.png" alt="" width="86" height="18" border="0"></a></td>
    	    <td rowspan="2">
    		    <img src="site 2/images/SDC_webdesign-1000_37.png" width="10" height="32" alt=""></td>
    	    <td>
    		    <a href="ostia.html"><img src="site 2/images/SDC_webdesign-1000_38.png" alt="" width="40" height="18" border="0"></a></td>
    	    <td rowspan="2">
    		    <img src="site 2/images/SDC_webdesign-1000_39.png" width="2" height="32" alt=""></td>
    	    <td colspan="2" rowspan="2">
    		    <img src="site 2/images/SDC_webdesign-1000_40.png" width="3" height="32" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="18" alt=""></td>
        </tr>
        <tr>
          <td colspan="4">
            <img src="site 2/images/SDC_webdesign-1000_41.png" width="144" height="14" alt=""></td>
    	    <td>
    		    <img src="site 2/images/SDC_webdesign-1000_42.png" width="40" height="14" alt=""></td>
    	    <td colspan="6">
    		    <img src="site 2/images/SDC_webdesign-1000_43.png" width="64" height="14" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="14" alt=""></td>
        </tr>
        <tr>
          <td colspan="6">
            <img src="site 2/images/SDC_webdesign-1000_44.png" width="258" height="28" alt=""></td>
    	    <td colspan="16">
    		    <img src="site 2/images/SDC_webdesign-1000_45.png" width="281" height="28" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="28" alt=""></td>
        </tr>
        <tr>
          <td>
            <img src="site 2/images/spacer.gif" width="150" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="4" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="46" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="118" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="4" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="26" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="60" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="75" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="4" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="48" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="18" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="58" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="36" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="5" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="45" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="10" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="40" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="2" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="31" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="13" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="4" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="14" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="1" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="2" height="1" alt=""></td>
    	    <td>
    		    <img src="site 2/images/spacer.gif" width="184" height="1" alt=""></td>
    	    <td></td>
        </tr>
      </table>
      <!-- End ImageReady Slices -->
    </div>
    </body>
    </html>
      <? mysql_close(); ?>

    Voila j'espère que c'est compréhensible, je suis pas trop calé mais je suis très attentif aux explications, merci d'avance pour ton aide.

  9. #9
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    Il manque une parenthèse
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    $requete = mysql_query ("SELECT img FROM  image WHERE id=" . intval($_GET['id']));
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  10. #10
    Membre du Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Décembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Boutique - Magasin

    Informations forums :
    Inscription : Décembre 2013
    Messages : 8
    Par défaut
    SUperrrrrrrrrrrrrrrrrrrrrrrrrr SABOTAGE tu es un génie.
    sa marche super bien Je te remercie infiniment

    Merci pour tout

    Peace and love

  11. #11
    Membre du Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Décembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Boutique - Magasin

    Informations forums :
    Inscription : Décembre 2013
    Messages : 8
    Par défaut autre détail
    Bonjour SABOTAGE

    je suis encore dans les parages (hé oui c'est pas facile)
    J'aimerais pouvoir redimensionner l'image à l'affichage dans la page souhaitée.

    donc le code ci-dessous

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <?php echo "<img src='fichier.php?id=2'/>";?>
    comment je pourrais ajouter un widht = "" et weigth=""

    Merci de ton aide encore une fois .

  12. #12
    Membre chevronné
    Inscrit en
    Mai 2008
    Messages
    350
    Détails du profil
    Informations forums :
    Inscription : Mai 2008
    Messages : 350
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <img src='fichier.php?id=2' width=VALUE height=VALUE  />

  13. #13
    Membre du Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Décembre 2013
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Boutique - Magasin

    Informations forums :
    Inscription : Décembre 2013
    Messages : 8
    Par défaut
    ok merci marius

    sa marche à merveille.
    Grand merci à tous et à toi aussi SABOTAGE pour ton assistance.

    PEACE AND LOVE

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [PDF] Insérer une image issue de la base de données
    Par lamiae2 dans le forum Bibliothèques et frameworks
    Réponses: 5
    Dernier message: 10/05/2009, 18h28
  2. Insérer une image issue d'une bdd sql
    Par Colieri dans le forum Bases de données
    Réponses: 10
    Dernier message: 26/08/2007, 13h29
  3. Convertir une image jpeg en une image .ico. .
    Par sonja dans le forum Imagerie
    Réponses: 5
    Dernier message: 14/05/2007, 18h41
  4. Afficher une image issue d'une requête SQL
    Par aygitci dans le forum Langage
    Réponses: 1
    Dernier message: 14/03/2007, 09h12

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo