[thelist] Uploading file names to a database

Olly Hodgson gnarly at punkass.com
Fri Mar 16 14:56:57 CST 2001


----- Original Message -----
From: "Aaron Cole" <awcole72 at hotmail.com>


> I'm building a UI for myself that will allow me to add images from my
local
> computer to the database on my server.  I am using an <input="text"
> name="image"> form field and then submitting the information to an action
> page which has an INSERT statement.  The problem is that the input value
> includes the entire path.  Is there anyway to only upload the file name
> itself; ie. image.jpg ?

It may be of no use here, but in Toolbook I would track backward through the
filename (ie from the end to the beginning), a letter at a time, putting
that letter into a variable (called eg: pic_filename) until I reached a
slash, at which point I would have the filename stored in pic_filename.

Can that be applied to what you're doing?

Olly
- www.furrybastards.com -






More information about the thelist mailing list