Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Thomas Edison Jr. declared Hi, If i have a filename room.jpg in my Upload Directory, and someone else comes and uploads a file by the same name, the previous room.jpg is overwritten by the new one. Any suggestions? Well, I

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Thomas Edison Jr.
Hmm... Tried it, and this doesn't sound too good : Fatal error: Call to undefined function: file_exist() in d:\apache group\apache\htdocs\mjimm\mjpals_added.php on line 37 Basically this is what i added in the appropriate place : if(file_exist($img1_name)) { $img1_name =

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Thomas Edison Jr. declared Hmm... Tried it, and this doesn't sound too good : Fatal error: Call to undefined function: file_exist() in d:\apache group\apache\htdocs\mjimm\mjpals_added.php on line 37 Sorry, it was a typo:

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Thomas Edison Jr.
Glory Power! I'm using the following code now... the Error is gone, but it's still overwriting the old file. It's not changing the name.. not doing anything, just uploading this new file and replacing the old one.. ?php $db = mysql_connect(localhost,use,pwd); mysql_select_db(dbname,$db);

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Thomas Edison Jr. declared Glory Power! I'm using the following code now... the Error is gone, but it's still overwriting the old file. It's not changing the name.. not doing anything, just uploading this new file and

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Thomas Edison Jr.
Glory! Well, I don't see any thing in your code that denotes the directory the images are going in? What about this : copy($img1, mjpalpics/$img1_name) or Die (Could not do); Sends the images to the mjpalpics Directory! 'path/to/img/img.jpg' exists and if so, name the upload img to

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Thomas Edison Jr. declared Hmm... possibly when i say if(file_exists($img1_name)), he's looking for the file name in the Directory where the Images initially go.. but then since i copy them elsewhere, they won't be in the initial

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Thomas Edison Jr.
Well thanks a bunch! --- Nick Wilson [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Thomas Edison Jr. declared Hmm... possibly when i say if(file_exists($img1_name)), he's looking for the file name in the Directory where the Images initially

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Jason Wong
On Saturday 11 May 2002 19:05, Thomas Edison Jr. wrote: Glory! Well, I don't see any thing in your code that denotes the directory the images are going in? What about this : copy($img1, mjpalpics/$img1_name) or Die (Could not do); Sends the images to the mjpalpics Directory!

RE: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread John Holmes
copy($img1, mjpalpics/$img1_name) or Die (Could not do); Sends the images to the mjpalpics Directory! Possibly. But one thing that is definitely a problem is: if(file_exists($img1_name)) { $img1_name = n+$img1_name; } should be: if(file_exists($img1_name)) {

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Miguel Cruz
On Sat, 11 May 2002, Thomas Edison Jr. wrote: If i have a filename room.jpg in my Upload Directory, and someone else comes and uploads a file by the same name, the previous room.jpg is overwritten by the new one. Any suggestions? In the long run, I think the best plan is to name your files

RE: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Thomas Edison Jr.
WOOO.. i did not know this was possible : file_exists(mjpalpics/$img1_name) And this might actually solve the whole issue!! Let me try this.. Thanks a BUNCH! T. Edison Jr. --- John Holmes [EMAIL PROTECTED] wrote: copy($img1, mjpalpics/$img1_name) or Die (Could not do); Sends the

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Thomas Edison Jr.
Hmm.. You gave me a lot to think about, and a whole lot of work to do. I definately love your idea and logic, and yes, it would make everyone happy. well i guess by the time i figure the coding and process out, i'll keep in mind to arrange for your British Airways Gift Certificate too. Glory!

Re: [PHP] Uploaded File OverWriting Old File

2002-05-11 Thread Jason Wong
On Sunday 12 May 2002 01:38, Thomas Edison Jr. wrote: WOOO.. i did not know this was possible : file_exists(mjpalpics/$img1_name) And this might actually solve the whole issue!! Let me try this.. You might find is_file() to be a 'more reliable' indicator because file_exists() works for