gestion de news php mysql
salut !!!
voilà grace à un excellent script d'un admin de developpez (qui fait 170pages...8O) http://j-reaux.developpez.com j'ai réussi à avancer jusqu'à là mais je bloque un peu...:cry:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| // Récupération des 4 derniers messages
$reponse = $bdd->query('SELECT titre, image, commentaire FROM slider ORDER BY ID DESC LIMIT 0, 4');
$news_query = "SELECT titre , image, commentaire FROM clients ORDER BY id DESC LIMIT 4");
$news_result = mysql_query($news_query);
while ($news_row = mysql_fetch_array($news_result))
{
echo '
<div id="slidesContainer">
<div id="slide">
<h4>'.stripslashes($news_row['titre']).'</h4>;
<p><a href="#/"><img src="'.stripslashes($news_row['image']).'"</p>;
<p>'.stripslashes($news_row['titre']).'</p>'
</div>
</div>
} |
à la base je n'ai que de l'HTML et ça donne ça:
Code:
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
| <div id="pageContainer">
<div id="slideshow">
<div id="slidesContainer">
<div class="slide">
<h4>reference</h4>
<p><a href="#/"><img src="img/maPhoto.jpg" alt="lol" width="177" height="120" /></a> description <br /><br /> mon résumé ici </p>
</div>
<div class="slide">
<h4>Grunge Brushes, Anyone?</h4>
<p><a href="http://sixrevisions.com/freebies/brushes/sr-grunge-free-high-resolution-photoshop-grunge-brushes/"><img src="img/img_slide_02.jpg" width="177" height="120" alt="A thumbnail image that says S R grunge photoshop brushes 6 high resolution grunge brushes by six revisions." /></a>In this layout, I used <a href="http://sixrevisions.com/freebies/brushes/sr-grunge-free-high-resolution-photoshop-grunge-brushes/">SR Grunge</a>, which is a free set of high-resolution Photoshop brushes you can download here on Six Revisions.</p>
<p>
</div>
<div class="slide">
<h4>How About Some Awesome Grunge Textures?</h4>
<p><a href="http://sixrevisions.com/freebies/textures/grunge-extreme-15-high-resolution-grunge-textures/"><img src="img/img_slide_03.jpg" width="177" height="120" alt="A thumbnail image that says grunge extreme 15 free high resolution grunge textures six revisions." /></a>The texture used in this web page is from the Grunge Extreme Textures freebie set by JC Parmley released here on Six Revisions.</p>
<p>You can head over to the <a href="http://sixrevisions.com/freebies/textures/grunge-extreme-15-high-resolution-grunge-textures/">Grunge Extreme</a> page to download the texture set or check out Six Revisions' <a href="http://sixrevisions.com/category/freebies/">freebie section</a> for even more goodies!</p>
</div>
<div class="slide">
<h4>'Tis the End, My Friend.</h4>
<p><a href="http://sixrevisions.com/tutorials/photoshop-tutorials/how-to-create-a-slick-and-clean-button-in-photoshop/"><img src="img/img_slide_04.jpg" width="177" height="120" alt="Thumbnail image that says sleek button using photoshop that links to a Photoshop tutoril." /></a>This is the last slide. Hit the left arrow control to go back to the other slides.</p>
<p>Alternatively, you may want to check out the tutorial on how to create a simple and cool button in Photoshop called "<a href="http://sixrevisions.com/tutorials/photoshop-tutorials/how-to-create-a-slick-and-clean-button-in-photoshop/">How to Create a Slick and Clean Button in Photoshop</a>" which was inspired by the <a href="http://www.campaignmonitor.com/designer/?utm_source=sixrevisions&utm_medium=banner&utm_term=2&utm_content=0003&utm_campaign=Apr09Banners">Campaign Monitor</a> web interface.</p>
</div>
</div>
</div>
<!-- Slideshow HTML -->
</div> |
il est dejà tard et mon cerveau ne veut plus rien entendre :aie:
si quelqu'un passe par là et comprend mon erreur, je le remercie d'avance !!! :mrgreen: