Hi I am trying to create a code that will automatically add my thumbnails to the database, it just does not seem to work.
Here is my code can someone help..
I sorry it's a lot of code.
<?php
$handle=opendir('.');
while (false!==($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "index.html" && $file != "wallpaper" && $file != "index.php3" && $file != "etc" && $file != "bin" && $file != "generateList.php3" && $file != "old") {
$GirlName = explode ("_",$file);
$PictureName = $GirlName[0] . " " . $GirlName[1];
$result = mysql_query("INSERT INTO tbl_Pictures (PictureName, DOB, Picture, Thumbnail, DateAdded) VALUES('$PictureName', '1976-06-23 12:43:19', '$file', '$file','NOW()');");
echo "$PictureName<br>";
/*
echo "$file<br>";
*/
}
}
closedir($handle);
?>
I look forward to any help..