bonjour,
j'ai trouvé un tuto qui traite se sujet avec un passage par "array"
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
 
$chemin_image="dossier-images/image.jpg";
$iptc = array('2#105' => 'titre', '2#120' => 'Commentaire', '2#122' => 'Auteur');
$iptcdata = NULL; #1
foreach($iptc as $tag => $string)#2
{
   $tag = substr($tag, 2); #3
   $iptcdata .= transformer_iptc($tag, $string); #4
}
function transformer_iptc($data, $value)
{
   $length = strlen($value);
   $retval = chr(0x1C).chr(2).chr($data);
 
   if($length < 0x8000)
      $retval .= chr($length >> 8).chr($length& 0xFF);
   else{
      $retval .= chr(0x80).chr(0x04). 
                 chr(($length >> 24)& 0xFF). 
                 chr(($length >> 16)& 0xFF). 
                 chr(($length >> 8)& 0xFF). 
                 chr($length& 0xFF);
   }
   return $retval.$value;
}
fichier = fopen($chemin_image, "wb"); # Ouverture du fichier
fwrite($fichier, $donnees); # Écriture du fichier
fclose($fichier); # Fermeture du fichier
je voudrais passer les valeurs contenues dans '2#105'et '2#120' dans un formulaire de ce style
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
	<form role="form" id="dom-form" action="formiptc.php" method="post" name="formulaire" onsubmit="return validation();"  enctype="multipart/form-data" autocomplete="on">          
					<div class="form-group"> 
						<label class="control-label " for="iptctitre">Titre</label>
						<input class="form-control" id="iptctitre" name="iptctitre" type="text"/>
					</div>
					<div class="form-group"> 
						<label class="control-label " for="iptcom">Commentaire</label>
						<textarea class="form-control" cols="40" id="iptcom" name="iptcom" rows="10"></textarea>
					</div>
					<div class="form-group">
						<button class="btn btn-primary " name="submit" type="submit">Envoi</button>
					</div>
				</form>
Je bloque pour remplacer l'array.
Merci à l'avance pour votre aide