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.
<ul> <li>http://coursesweb.net/html/</li> <li>http://coursesweb.net/css/</li> </ul>
.some_class { display: list-item; }
var obj = { "courses": ["php", "javascript", "ajax"] }; var jsonstr = JSON.stringify(obj); alert(jsonstr); // {"courses":["php","javascript","ajax"]}
$strhtml = '<body><div id="dv1">CoursesWeb.net</div></body>'; $dochtml = new DOMDocument(); $dochtml->loadHTML($strhtml); $elm = $dochtml->getElementById("dv1"); echo $elm->nodeValue; // CoursesWeb.net