Skip to main content

Posts

Showing posts from March, 2015

CakePHP | File Upload

 In your view

<div class="col-md-4"> <div class="box box-warning"> <div class="box-header"> <h3 class="box-title"><?php echo __('Profile Picture'); ?></h3> </div> <div class="box-body"> <?php echo $this->Form->create('User', array('action' => 'upload_profile_pic', 'role' => 'form', 'enctype'=>'multipart/form-data')); ?> <fieldset> <div class="row"> <div class="col-md-12"> <div class="form-group"> <?php echo $this->Form->input('photo', array('label' => false, 'type' => 'file', 'class' => 'form-control', 'id' => 'photo')); ?> </div><!-- .form-group --> </div> </div> <div c…