Php-mysql Course

This is a script to Upload images and audio files to create webpages with a Gallery of Images and Audio files (MP3), grouped by categories.
It is created with PHP, MySQL (using OOP technology, and PDO), and JavaScript.
Data of the uploaded files (file name, title, description, category, and registration date) are stored in MySQL database.
The extension of the file allowed for upload is checked on client side (with JavaScript), and also on the server. The PHP script checks also the size of the files, width and height for images, before upload.
This Upload script uses the Ajax technology, the files are uploaded without opening or reloading the page, so a refresh will not resend any form data to the server.
You can add multiple uploading fields in the form to upload multiple files in the same time.
The PHP code creates automatically the meniu with categories for image and audio gallery, and the list with uploaded files in the accessed category.
When images are uploaded, the script automatically creates thumbails for these images. The image gallery displays the thumbails, then when click on a thumbail, it is opened a new window with the image.
Before you use this script, you should have a minimum knowledge about HTML and PHP.


• To Download it, click: Script Upload for Images and Audio Gallery

Requirements

- PHP 5.2+ (with PDO)
- MySQL 5+
- Web browser with JavaScript enabled.

Here you can test the form used for upload.
Choose Galery:  
X


• This script is Free (does not provide support or personal modifications).
More details about installation and usage you'll find in a "Read.html" file (and a PHP file for test), in the archive with the script.

It was successfully tested with Mozilla Firefox, Internet Explorer, Google Chrome and Opera, for a general configuration on localhost with XAMPP. If on other systems does not work properly, depends on their configuration. Problems can appear especially on hostings which not support PDO; or if you modify something in the script code, without knowing PHP and JavaScript.

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag is used to add lists into <ul> and <ol> elements?
<dt> <dd> <li>
<ul>
 <li>http://coursesweb.net/html/</li>
 <li>http://coursesweb.net/css/</li>
</ul>
Which value of the "display" property creates a block box for the content and ads a bullet marker?
block list-item inline-block
.some_class {
  display: list-item;
}
Which instruction converts a JavaScript object into a JSON string.
JSON.parse() JSON.stringify eval()
var obj = {
 "courses": ["php", "javascript", "ajax"]
};
var jsonstr = JSON.stringify(obj);
alert(jsonstr);    // {"courses":["php","javascript","ajax"]}
Indicate the PHP class used to work with HTML and XML content in PHP.
stdClass PDO DOMDocument
$strhtml = '<body><div id="dv1">CoursesWeb.net</div></body>';
$dochtml = new DOMDocument();
$dochtml->loadHTML($strhtml);
$elm = $dochtml->getElementById("dv1");
echo $elm->nodeValue;    // CoursesWeb.net
Upload Script for Gallery of Images and Audio files

Last accessed pages

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (141746)
  2. Rectangle, Oval, Polygon - Star (3322)
  3. PHP PDO - prepare and execute (9187)
  4. jQuery Ajax - load() method (10835)
  5. Creating XML data - E4X in ActionScript 3 (3088)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (470)
  2. CSS cursor property - Custom Cursors (78)
  3. The Mastery of Love (69)
  4. PHP-MySQL free course, online tutorials PHP MySQL code (62)
  5. CSS3 2D transforms (46)