How do I know this? Because I read the error message.
Jeremy BurnsClass Outfit
http://www.classoutfit.com
Jeremy Burns
http://www.classoutfit.com
On 5 Apr 2012, at 16:48:15, Daniel wrote:
I get the following error in my ImagesController:
Notice (8): Undefined index: Image [APP\Controller
\ImagesController.php, line 31]
The controller code is as follows (ending on line 31) :
public function img_upload($person_id = null) {
if ($this->request->is('post')) {
$fileinfo = $this->request->data['Image']['filename'];
...
The ctp file is as follows:
<div class="images form">
<?php echo $this->Form->create('Image', array('enctype' => 'multipart/
form-data')); ?>
<fieldset>
<legend><?php echo __('Upload Image'); ?></legend>
<?php echo $this->Form->input('filename', array('type' => 'file')); ?</fieldset>
<?php echo $this->Form->end(__('Submit'));?>
</div>
<div class="actions">
<h3><?php echo __('Actions'); ?></h3>
<ul>
<li><?php echo $this->Html->link(__('Home Page', true),
array('controller' => 'pages', 'action' => 'index')); ?> </li>
</ul>
</div>
What am I missing?
Thanks.
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment