 |
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0  | This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 19th, 2008, 06:33 AM
|
|
Registered User
|
|
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
CHAPTER 7 - UPDATE an Image
hello!
I've been in chapter 7, and i've developed a form for the user to insert images.
WHen he inserts a image, it is uploaded. But if he wants later on to edit the current information and choose other photo?
I use the same code and use the "UPDATE" in sql?
Thanks in advance
|
|

March 19th, 2008, 07:35 AM
|
|
Registered User
|
|
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I found a way to upload...just created a new variable and then i dont use the lastpicid..
This is what comes when i try to "override" the image...
Warning: rename(c:/xampp/htdocs/uffizi/images/portfolio/09.jpg,c:/xampp/htdocs/uffizi/images/portfolio/emp51_antes.jpg) [function.rename]: File exists in C:\xampp\htdocs\uffizi\cms\commit.php on line 49
Any function that can override the file?
|
|

March 19th, 2008, 12:06 PM
|
|
Registered User
|
|
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I tried to use the function file_exists like this
if(!file_exists($newfilename)){
rename($ImageName, $newfilename);
}
----------
If the name of the newfilename doesnt have the same name he can upload the new image...but if dont, he doenst save the new image...
....
|
|

March 19th, 2008, 01:13 PM
|
|
Registered User
|
|
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
and basically i still want to save the new image and i cant..
Help!
|
|

March 20th, 2008, 12:27 PM
|
|
Registered User
|
|
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Still not any answer...
What i want is give the oportunitie the user to change his file and stays with the same name!!
Any guidance...please?
|
|
 |