And store the file type - it does make a difference when you go to display
it..i.e. *.gif or *.jpg..
Phil J.



olinux o wrote:

> Best way to do it is to store the filename in the db,
> faster and really simple.
>
> What I have done at my site is write a script that
> uploads the file. Uploading generates something like
> three variables [filesize, filetype, and filename] the
> only one I am concerned with is filename. The
> variables are named the same as the file upload
> fieldname plus an extension like this:
>
> say my upload field is NAME="upload_image" when i
> upload the filename can be referenced by
> upload_image_name - size by upload_image_size at least
> from what i can remember quickly.
>
> so i insert this filename [upload_image_name] into a
> table that references the associated ID. something
> like this:
>
> IMG_TABLE
>
> apartment_id   filename
>
> k, so this will store the filename, now you just need
> to grab the filename from this table and echo the
> filename into the <IMG SRC=""> or <A HREF  =""> like
> this: <A HREF="image_folder/<? echo $filename ?>">
>
> HTH,
> probably a bit confusing, lemme know if you would like
> my script.
>
> olinux
>
> --- Sharmad Naik <[EMAIL PROTECTED]> wrote:
> > I m using postgresql-7.0.2 with php,My problem is
> > that this database
> > doesn't allow more than 4k images to be stored .
> > I wanted to know how to store images in a
> > directory and keep its link in the dbase or if
> > anyone can tell me how to split
> > the image so that it can be kept in the dbase
> > -Thanks
> > --
> > The secret of the universe is @*&!'^#+ NO CARRIER
> > __    _  _      _  _
> > |_|_||_||_||\/||_|| \
> > _|| || || \|  || ||_/
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to