update picture

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

update picture

Post by C_Calav »

can anyone point me in the right direction on how to update a picture?

or isnt this done?
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

use ftp
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

And by updating you mean?
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

sorry i should have explained my self more.

what i wanted to achieve i have done, just used the insert pic script for a update pic script.

when i mean update pic, i mean update the pic's file name.

what i have so far -

Insert Script: enter some details, then upload a pic

Update Script: update details and update pic file name

i just used insert pic, for update pic.

works fine.

only prob is you'll have 2 pics the same in your dicrectoy but with different file names
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

If your left with two of the same you can use unlink() to delete one. Are you not just using rename() to rename the image?
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

the user is renaming the file manualy, i will look into the rename() function, thanx kettle_drum!
Post Reply