Closed Thread Icon

Topic awaiting preservation: file upload (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=22376" title="Pages that link to Topic awaiting preservation: file upload (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: file upload <span class="small">(Page 1 of 1)</span>\

 
EDDII
Bipolar (III) Inmate

From:
Insane since: May 2004

posted posted 06-30-2004 15:37

yo guys, anybody got any idea how i can set up a php script that uploads a picture from <input type="file"> from a form on my webpage and uploads it so that other users can see it
also i would like a link to it to be added onto another page so that i wouldnt have to get everyone to e-mail pictures to me everytime they have somthing to put on my site

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 06-30-2004 16:14

I'd start by reading up on how php handles file uploads in the manual.

The link, I'd probably write to a file (see php->fopen), which I'd then parse and display in the other page.

crip
Bipolar (III) Inmate

From: iasi, romania
Insane since: Apr 2002

posted posted 06-30-2004 18:17

Hmm, write links with fopen in a html page? That kinda has no sense, php is for generating dynamic pages mostly, why make it write static pages?
Better make another small scripts that adds info about that pic in a database, such as the person who put it there, date, etc.
And then show them on a page taking the info about each pic out of that db.


Curiously yours, crip

(Edited by crip on 06-30-2004 18:34)

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 06-30-2004 18:59

The database might be a better idea. Then dynamically generate the page's links via a page. Moving further along this topic. Does anyone have any links on including meta-data and parsing meta-data from pictures (jpeg, gif, png)? This sort of ability could be pretty useful.

Dan @ Code Town

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 06-30-2004 19:00

because writing the links into a file is the easiest way to store them.

I did never mention static pages - you could save a php->serialized() array into the file and render that any way you like it.

Or you could walk the directory you're storing the images in, sort them by filedate, and create the links that way.

crip
Bipolar (III) Inmate

From: iasi, romania
Insane since: Apr 2002

posted posted 07-01-2004 00:47

ok, sorry, misunderstood you...
But i always found working with mysql functions easier than writting to file.
Parsing a directory for files is easy i agree, but you have no description available for elemnts, i doubt it people would add meta data to they pics before uploading


Curiously yours, crip

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 07-01-2004 01:46

Ah, but if you could add the meta data while the file is being transfered. Instead of storing the data a DB or a separate file it could all be encoded in the image.

I don't know if it is possible, that is why I am wondering if there is info on this out there.

Dan @ Code Town

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 07-01-2004 04:26

WarMage

I don't know if this is anything you can use as it's PHP5, but maybe it will be a good starting point for you.

http://pel.sourceforge.net/

-Butcher-

crip
Bipolar (III) Inmate

From: iasi, romania
Insane since: Apr 2002

posted posted 07-01-2004 08:45

Ok, but WHAT metadata? How will a script know who the person is, what ocasion has the photo been made on... OR you mean that the person should write it in an input field before submitting?
But again, instead of using functions that alter/read metadat, isn't it easier to use a db system?


Curiously yours, crip

« BackwardsOnwards »

Show Forum Drop Down Menu