RE: Upload images with minimun effort from final user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Its pretty simple, the section in the manual has lots of detail on handling file uploads. The file's name is accessible thru

$name = $_FILES['formFieldName']['name'];

In this case, I would also suggest that you create the name of the image to store it on the file system..otherwise you may end up with N number of files with the same name (ie mycat.jpg). By associating another randomly generated name with the image as the true name, you should avoid that issue...

Bastien


From: "David Arroyo" <darroyo@xxxxxxxxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
Subject:  Upload images with minimun effort from final user
Date: Mon, 26 Sep 2005 19:48:24 +0200

Hi @ll,

I have to make an interface for a newspaper site, where users can upload
news including images.



I want to store the image's name in a field of my NEWS table, in order to
catch it with an <img> tag later, but I don't want people has to upload the
image, remember its name, and put it as another field in the form.



Can anyone help me with an example, tutorial or any idea?



Thanks in advance,

David.




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux