Wrox Programmer Forums
|
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
 
Old March 19th, 2008, 06:33 AM
Registered User
 
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

 
Old March 19th, 2008, 07:35 AM
Registered User
 
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

 
Old March 19th, 2008, 12:06 PM
Registered User
 
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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...

....

 
Old March 19th, 2008, 01:13 PM
Registered User
 
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

and basically i still want to save the new image and i cant..

Help!

 
Old March 20th, 2008, 12:27 PM
Registered User
 
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Update IMAGE file in SQL Server KingMonty SQL Server 2005 2 October 5th, 2007 04:09 PM
Image -- Insert/Update/Delete in sql2000 !!! dagad ASP.NET 2.0 Professional 0 October 27th, 2006 08:25 AM
Image -- Insert/Update/Delete in sql2000 !!! dagad ASP.NET 2.0 Basics 0 October 27th, 2006 08:25 AM
How to update asp:image control busybee ASP.NET 1.0 and 1.1 Basics 2 March 23rd, 2006 03:03 AM
Dynamic Image Update aymawadi ADO.NET 1 April 10th, 2005 04:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.