Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8
This is the forum to discuss the Wrox book Professional CodeIgniter by Thomas Myer; ISBN: 9780470282458
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 4th, 2012, 09:32 AM
Registered User
Points: 55, Level: 1
Points: 55, Level: 1 Points: 55, Level: 1 Points: 55, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2012
Posts: 9
Thanks: 0
Thanked 3 Times in 3 Posts
Default Product Edit Page Returns Blank Page on Update

I am using the latest framework of CI, and while the book is written for 1.7, I have not had many major issues. I know what/where code needs to be updated for the latest framework, and so far I have had great success ... until now.

I am creating the page and functions for the Product Edit Page. The page displays as expected, however when I click the button to update the product information, I am returned a blank page.

The path I start on is : localhost/ci_fullsite_professional/admin/products/edit/17

I click submit and I get localhost/ci_fullsite_professional/admin/products/edit. I expect to the see the dashboard and the flashdata message stating the product was updated.

I can create and delete products successfully. I can create, edit and delete Categories successfully ... it's just the update of the product that returns blank.

UPDATE:
After some debugging, I found the problem code being the image upload ... however, when I look at the code I see no issues.
Code:
if(!$this->upload->do_upload('image')){
	$this->upload->display_errors();
	exit();
}
$image = $this->upload->data();

if ($image['file_name']){
	$data['image'] = "assets/images/products/".$image['file_name'];
}
			
if(!$this->upload->do_upload('thumbnail')){
	$this->upload->display_errors();
	exit();
}
$thumb = $this->upload->data();

if ($thumb['file_name']){
	$data['thumbnail'] = "assets/images/products/".$thumb['file_name'];
}
I have tried add this:
Code:
if ($_FILES['image']['name']){
	if(!$this->upload->do_upload('image')){
		$this->upload->display_errors();
	exit();
	}
	$image = $this->upload->data();
	... etc ...
AND I have tried add this:
Code:
if (strlen($_FILES['image']['name'])){
	if(!$this->upload->do_upload('image')){
		$this->upload->display_errors();
		exit();
	}
	$image = $this->upload->data();
	... etc ...
Anyone have any ideas?

Last edited by plavalle; September 4th, 2012 at 12:09 PM.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF giving first page as blank if page count > 1 using xsl:fo srmxslca XSLT 14 May 5th, 2011 05:01 AM
Displaying Product Categories - the page links talofo BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 6 October 12th, 2009 09:53 AM
why blank page? gilgalbiblewheel Classic ASP Databases 6 December 31st, 2004 08:30 PM
Results Page always returns '0 found' jonrayworth Dreamweaver (all versions) 4 November 9th, 2003 04:48 PM



All times are GMT -4. The time now is 03:50 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.