PHP/MYSQL slideshow

images php coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
crf121359
New php-forum User
New php-forum User
Posts: 17
Joined: Sun Jan 22, 2012 7:40 am

PHP/MYSQL slideshow

Post by crf121359 » Wed Jan 25, 2012 12:53 pm

Hi,

I have a php code that allows me to upload images on my server. it will rename the image and saves the image names and some texts on the mysql databse.

I just need to know how I can pull those images and texts related to each image and make an slideshow on a PHP page?

here is my current code for display.php

Code: Select all

<?php 
 // Connects to your Database 
 mysql_connect("localhost", "databaseusernam", "password") or die(mysql_error()) ; 
 mysql_select_db("database") or die(mysql_error()) ;
 
 //Retrieves data from MySQL 
 $data = mysql_query("SELECT * FROM employees LIMIT 3") or die(mysql_error());
 
 //Puts it into an array 
 while($info = mysql_fetch_array( $data )) 
 { 
 
 //Outputs the image and other data
 Echo "<img src=images22/".$info['uploaded'] ."> <br>"; 
 Echo "<b>Name:</b> ".$info['name'] . "<br> "; 
 Echo "<b>Email:</b> ".$info['email'] . " <br>"; 
 Echo "<b>Phone:</b> ".$info['phone'] . " <hr>"; 
 }
 ?> 
the page above will show the images but its not a slideshow.


I look forward to your replies.

Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests