0

I have admin form in which I have image upload option.Button "Select" will select a image ,then user click button Upload to upload image. Finally image name and path will be save when form submit image field It will be great help if someone can help me with this. thanks

asked Aug 13, 2018 at 10:37

1 Answer 1

0

First you should create a new controller.php for inserting data in database. give url in form action of your controller

public function indexAction() {
 $block = $this->getLayout()->createBlock('core/template');
 $block->setTemplate('folder/file.phtml'); 
 echo $block->toHtml();
 $this->_title($this->__('Customers'))->_title($this->__('Customers Authentication'));
 $this->loadLayout();
 $this->renderLayout(); 
 }
Ansar Husain
3,4791 gold badge15 silver badges32 bronze badges
answered Aug 13, 2018 at 10:45
2
  • After That you should create insert Action.php and pass code here Commented Aug 13, 2018 at 11:00
  • Ok . Thanks for your reply. Let me check this code Commented Aug 14, 2018 at 9:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.