PHP Classes


Recommend this page to a friend!
  Classes of Barton Phillips   MySQL Slideshow   Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: MySQL Slideshow
Present slideshow from images listed in a database
Author: By
Last change: Updated and README.html. Deleted gulpfile.js added
modified: README.html
deleted: gulpfile.js
new file:
This is a new version of mysqlslideshow. I have removed all of the class/ stuff and included it in the single file examples/mysqlslidehow.class.php.
The class file now has all of the mysqli logic in the class. It also has what was the mysqlslideshow.php logic after the class.
The other file have been modified to work better.
deleted: class/Error.class.php
deleted: class/SqlException.class.php
deleted: class/dbAbstract.class.php
deleted: class/dbMysqli.class.php
deleted: class/helper-functions.php
deleted: class/mysqlslideshow.class.php
modified: composer.json
deleted: examples/ERROR.log
new file: examples/Pictures/P1010001.JPG
new file: examples/Pictures/P1010002.JPG
new file: examples/Pictures/P1010003.JPG
modified: examples/addimages.php
modified: examples/addupdateimage.php
modified: examples/browserside.html
modified: examples/dbclass.connectinfo.i.php
modified: examples/ie.html
modified: examples/mktable.sql
new file: examples/mysqlslideshow.class.php
deleted: examples/mysqlslideshow.php
modified: examples/serverside.php
Date: 2 months ago
Size: 3,342 bytes


Class file image Download


Store Slide Show information in a MySql database and show Slide Show in a browser.


This class was designed in 2009 and was updated April 2015 to new HTML5 and CSS3 features. It was updated again Jan. 2023.


Either download the ZIP file or install with Composer.

<ol style="list-style-type: decimal"> <li>unzip the zip file (you have probably already done this if you are reading this)</li> <li>the directory structure is as follows: <ul> <li>examples/ </li> <li>README.html</li> <li></li> <li>composer.json</li> <li>gulpfile.js</li> </ul> If you loaded this with 'composer' instead of from the ZIP then this stucture is under 'vendor/bartonlp/mysqlslideshow/'. <li>In either case you may need get mysql running and then:

<pre><code>CREATE DATABASE mysqlslideshow;</code></pre>

Create the database table. The file 'mktable.sql', in the 'examples' directory, if sourced within the 'msql' client will make the table 'mysqlslideshow'. If you want to call your table something else you can edit the 'mktable.sql' file and then either edit the 'mysqlslideshow.class.php' (NOT RECOMMENDED), or use the constructor with the additional optional arguments: The first three arguments come from the 'dbclass.conectioninfo.i.php' file. Add the forth and fifth arguments for your database name and table name.

<pre><code>$ss = new MySqlSlideshow($Host, $User, $Password, 'YourDatabaseName', 'YourTableName');</code></pre>

Or edit 'dbclass.connectioninfo.i.php' and add '$Database' and '$Table' and add them to the invocation above instead of the strings. You can create the table from inside the 'mysql' client by using the source statement:

<pre><code>source mktable.sql;</code></pre>

or just do it the hard way by typing in the create statement.</li> <li>add some images to your database table. There are two easy ways to do this: <ol style="list-style-type: lower-alpha"> <li>use the 'addupdateimage.php' program in the 'examples' directory. <li>use the 'addimages.php' program in the 'examples' directory. </ol>

<li>try out the examples 'serverside.php' and 'browserside.html' on your own server. Then start writing your own code. Have fun. If you don't have Apache running you can use the PHP server. Just enter

<pre><code>php -S localhost:8080</code></pre>

from the project directory and then in your browser enter


or 'browserside.html' to see the sites.

Any questions can be sent to <a href="mailto://"></a> I will try to answer reasonable questions.</li> </ol>


There are three files in the 'examples' directory:

  • serverside.php
  • browserside.html
  • ie.html
  • mysqlslideshow.class.php

'mysqlslideshow.classs.php' is the Ajax target and has the MySqlSlideShow class.


The class is hosted at as well as the 'PHP Classes'

Copyright &copy; 2009-2023 Barton Phillips <a href="mailto://"></a> OR <a href="mailto://"></a>

Last Modified Jan. 27, 2023