You can use the GD module in PHP to accept and resize the images.  Currently
(do to copyright restrictions) the GD libraries ONLY work with .jpg and .png
graphics.  This form will only allow you to upload one image at a time, so
you'd have to 1) Make a script to accept and resize the files and then 2)
Create some sort of loop to continualy accept and process multiple files.
The only way I can think to do this is to ftp the files to a temporary
location on the server and then manualy run a while loop in UNIX.  ex.

For Each 'ls *.jpg' as $i script.php $t  (Check syntax on this one)

Perhaps the forum has another idea? (Returned copy.)


----- Original Message -----
From: "Luke Thomas" <[EMAIL PROTECTED]>
To: "Jonathan Underfoot" <[EMAIL PROTECTED]>
Sent: Sunday, October 14, 2001 5:10 AM
Subject: Re: How To Upload

> Hi,
>        This Mail interested me very much, I am currently trying to create
> own personal photo album, and I was wondering about how to upload  jpg's.
> there a way that you could upload more than 1 at a time? Also I would like
> to resize the images to thumbnails aswell. Do I need the GD module
> to be able to manipulate the images?
> Hope you can help.
> Luke Thomas
> ----- Original Message -----
> From: "Jonathan Underfoot" <[EMAIL PROTECTED]>
> Newsgroups: php.db
> Sent: Friday, February 08, 2002 10:28 PM
> Subject: Re: How To Upload
> Heres a form and the PHP behind it I use:
> <---FORM--->
> <HTML>
> <HEAD>
> <TITLE>Add Pic</TITLE>
> </HEAD>
> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
> <form enctype="multipart/form-data" action="addpic.php" method="post">
> <input type="hidden" value="$com_num" name="com_num">
> Pic to Upload(Only .jpg and .gif files)
> <p><input name="userfile" type="file">
> <input type="submit" value="Send File">
> </form>
> </BODY>
> </HTML>
> <---PHP FILE--->
> <?PHP
> if (is_uploaded_file($userfile)) {
>  copy($userfile, "location/");
> }} else {
>     echo "That diddn't work!";
> }
> header ("Location:";);
> ?>
> I do much more with it (resize and edit images etc etc) but thats the
> layout...
> -Jonathan

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to