HOW CAN I INCLUDE JQUERY SLIDER INSTED OF PHP WITH LOOP PLS HELP...

Recommended Answers

All 8 Replies

dont understand your question

simply put jquery code for slider inside your page, and please can you talk more about your request.

Support @OsaMasw's comment, "simply put jquery code for slider inside your page" and change the image to the directory your image are.

But, please do understand that by using php loop, the url for the image can be changed accordingly with code but if you hardcoded the image url to jquery slider, it will be a pain to change it next time.

Normally how I do is, I loop with php to generate the images, then at the page, add the jquery slider plugin plugged to the div containing my slide images.

ok sir.when database more item images are how to include in a jquery sliders....

you can use php code inside html like example

<?
$sql = "SELECT * FROM `table` WHERE `category` = 34 ORDER BY `date` DESC LIMIT 5";
$query = mysql_query($sql);
while($data = mysql_fetch_assoc($query)) { 
?>
  <li>
   <div>
   <strong> <? echo $data['title']; ?></strong>
   </div>
   <a href="#" target="_blank"><img src="../<? echo $data['picture']; ?>"></a>
  </li>
<? } ?>

you can replace html code with your slider jquery code and php sql with your sql to fetch data from database

Member Avatar for diafol

Why are we doing all the work here? sarathnair, please show some evidence of what you've tried and where you got to, error messages etc. Stack Overflow would probably flame you alive if you asked a question like this over there.

Have a think about what you're actually asking for and read this: http://bit.ly/Dwebphp

Stack Overflow would probably flame you alive if you asked a question like this

ha ha ha they burned me once :P

Member Avatar for diafol

ha ha ha they burned me once :P

Makes you scared to post. They're so far up their own derrieres they need a Davy lamp to see where they're going.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.