par
davidb1967 » 07 mai 2012, 02:47
Bonjour,
J'ai un formulaire dans le quel je rentre une date ,que je stock dans ma base SQL ( pas forceement la date du jour)
Au resultat j'obtiens la date du jour .
Hors je je voudrai par exemple si je rentre aujourd'hui la date du 12 juillet 2012 obtenir 120712 et non pas 070512 qui est la date du jour ou j'écrie ce post.
<?php
$client = 0 ;
$row_code_client['date'] = date("dmy");
$texte = "Votre code" ;
while($client < $row_code_client['nb_client']) {
if($client!=0 && (($client%7)==0)){
echo '</tr><tr>';
}
$filename= ($str_client = str_pad($client, 3, "0", STR_PAD_LEFT) .".png");
QRcode::png(($row_code_client['prefix'] . $row_code_client['photographe'] . $row_code_client['date'] .
$row_code_client['carte'] . ($str_client = str_pad($client, 3, "0", STR_PAD_LEFT) ) .
$row_code_client['magazin'] . $row_code_client['sufix']), $filename,'S',3,1);
echo '<h6><center><td><img src="'.$filename.'" /><br>';
echo '<h1>' .$texte. '</h1>' ;
echo $row_code_client['photographe'];
echo $row_code_client['date'];
echo $row_code_client['carte'];
$str_client = str_pad($client, 3, "0", STR_PAD_LEFT);
print $str_client;
echo $row_code_client['magazin'] . '<br><br><br /></td></center></h6>';
$client++ ;
}
?>
merci de votre aide
Bonjour,
J'ai un formulaire dans le quel je rentre une date ,que je stock dans ma base SQL ( pas forceement la date du jour)
Au resultat j'obtiens la date du jour .
Hors je je voudrai par exemple si je rentre aujourd'hui la date du 12 juillet 2012 obtenir 120712 et non pas 070512 qui est la date du jour ou j'écrie ce post.
[php]<?php
$client = 0 ;
$row_code_client['date'] = date("dmy");
$texte = "Votre code" ;
while($client < $row_code_client['nb_client']) {
if($client!=0 && (($client%7)==0)){
echo '</tr><tr>';
}
$filename= ($str_client = str_pad($client, 3, "0", STR_PAD_LEFT) .".png");
QRcode::png(($row_code_client['prefix'] . $row_code_client['photographe'] . $row_code_client['date'] .
$row_code_client['carte'] . ($str_client = str_pad($client, 3, "0", STR_PAD_LEFT) ) .
$row_code_client['magazin'] . $row_code_client['sufix']), $filename,'S',3,1);
echo '<h6><center><td><img src="'.$filename.'" /><br>';
echo '<h1>' .$texte. '</h1>' ;
echo $row_code_client['photographe'];
echo $row_code_client['date'];
echo $row_code_client['carte'];
$str_client = str_pad($client, 3, "0", STR_PAD_LEFT);
print $str_client;
echo $row_code_client['magazin'] . '<br><br><br /></td></center></h6>';
$client++ ;
}
?> [/php]
merci de votre aide