Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('mysql.php');
- if ($handle = opendir('images')) {
- while (false !== ($file = readdir($handle))) {
- if($file!='.' && $file!='..') {
- $images[] = "('".$file."')";
- }
- }
- closedir($handle);
- }
- $query = "INSERT INTO images (filename) VALUES ".implode(',', $images)." ";
- if (!mysql_query($query)) {
- print mysql_error();
- }
- else {
- print "Изображение подтверждено!";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement