*you'd need a table that looks like :
CREATE TABLE pics
(
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(`id`),
`pic_href` varchar(255) NOT NULL
);
*create your HTML upload form...
*receives it by php, use the following function to resize it :
function uploadPic($prefix,$formSrc,$dDir,$maxWidth,$maxHeight,$resizeFlag,$tempName) ;
*move it to the desired folder, open a connection with your db, you'd use a SQL that looks like :
$dir = "pics/" . $_FILES["file"]["name"];
$sql = mysql_query("INSERT INTO pics (pic_href) VALUES ('$dir')");
*now when you want to "select" your pics and call them, just query their "pic_href"s and use these values as hrefs for anchor tags...
cheers