Re: file uploading in cake php
http://www.meiocodigo.com/projects/meioupload/ On Sun, Dec 28, 2008 at 12:40 PM, mona poojapinj...@gmail.com wrote: I tried alot but it is not working any other options --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: file uploading in cake php
Google upload files with CakePHP On Dec 27, 8:59 am, mona poojapinj...@gmail.com wrote: Hello mike sorry for distutbing you once again. I am sending you my file uploading problem please i need your help if you help me it will be great help for me this is my add view code please consider it h2New Entry/h2 ?php echo $form-create('Entry',array('action' = 'add','type' = 'file'));? div class=optional ?php echo $form-input('Section', array('options' = array ('Announcements','The Venue','About Melbourne')),array('error' = 'false','value' = array(1,2,3) )); ? /div div class=optional ?php echo $form-input('Submenu', array('options' = array (1,2,3,4,5)),array('error' = false,'label' = 'Submenu')); ? /div div class=optional ?php echo $form-input('Listitem',array('label' = 'Listitem'),array ('error' = false));? /div div class=optional ?php echo $form-input('Detail',array('label' = 'Detail'),array ('error' = false));? /div div class=optional ?php echo $form-file('File'); ? /div div class=submit ?php echo $form-submit('Add');? /div /form ul class=actions li?php echo $html-link('Home', '/entries/index')?/li /ul from this form i wan't to upload file when I click on submit button where to write file upload code please correct my code this is my controller code ?php class EntriesController extends AppController { var $name = 'Entries'; var $helpers = array('Html','Form'); function index() { $this-Entry-recursive = 1; $this-set('entries', $this-Entry-findAll()); } function view($id = null) { if (!$id) { $this-Session-setFlash('Invalid id for Entry.'); $this-redirect('/entries/index'); } $this-set('entry', $this-Entry-read(null, $id)); } function add() { if (empty($this-data)) { $this-render(); } else { //$this-cleanUpFields(); if ($this-Entry-save($this-data)) { $this-Session-setFlash('The Entry has been saved'); $this-redirect('/entries/index'); } else { $this-Session-setFlash('Please correct errors below.'); } } } function edit($id = null) { if (empty($this-data)) { if (!$id) { $this-Session-setFlash('Invalid id for Entry'); $this-redirect('/entries/index'); } $this-data = $this-Entry-read(null, $id); } else { //$this-cleanUpFields(); if ($this-Entry-save($this-data)) { $this-Session-setFlash('The Entry has been saved'); $this-redirect('/entries/index'); } else { $this-Session-setFlash('Please correct errors below.'); } } } function delete($id = null) { if (!$id) { $this-Session-setFlash('Invalid id for Entry'); $this-redirect('/entries/index'); } if ($this-Entry-del($id)) { $this-Session-setFlash('Record deleted successfully'); $this-redirect('/entries/index'); } } } ? how to upload files from this code --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: file uploading in cake php
I tried alot but it is not working any other options --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: file uploading in cake php
http://bin.cakephp.org/saved/23715 On Dec 28, 6:40 pm, mona poojapinj...@gmail.com wrote: I tried alot but it is not working any other options --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: file uploading in cake php
Hello mike sorry for distutbing you once again. I am sending you my file uploading problem please i need your help if you help me it will be great help for me this is my add view code please consider it h2New Entry/h2 ?php echo $form-create('Entry',array('action' = 'add','type' = 'file'));? div class=optional ?php echo $form-input('Section', array('options' = array ('Announcements','The Venue','About Melbourne')),array('error' = 'false','value' = array(1,2,3) )); ? /div div class=optional ?php echo $form-input('Submenu', array('options' = array (1,2,3,4,5)),array('error' = false,'label' = 'Submenu')); ? /div div class=optional ?php echo $form-input('Listitem',array('label' = 'Listitem'),array ('error' = false));? /div div class=optional ?php echo $form-input('Detail',array('label' = 'Detail'),array ('error' = false));? /div div class=optional ?php echo $form-file('File'); ? /div div class=submit ?php echo $form-submit('Add');? /div /form ul class=actions li?php echo $html-link('Home', '/entries/index')?/li /ul from this form i wan't to upload file when I click on submit button where to write file upload code please correct my code this is my controller code ?php class EntriesController extends AppController { var $name = 'Entries'; var $helpers = array('Html','Form'); function index() { $this-Entry-recursive = 1; $this-set('entries', $this-Entry-findAll()); } function view($id = null) { if (!$id) { $this-Session-setFlash('Invalid id for Entry.'); $this-redirect('/entries/index'); } $this-set('entry', $this-Entry-read(null, $id)); } function add() { if (empty($this-data)) { $this-render(); } else { //$this-cleanUpFields(); if ($this-Entry-save($this-data)) { $this-Session-setFlash('The Entry has been saved'); $this-redirect('/entries/index'); } else { $this-Session-setFlash('Please correct errors below.'); } } } function edit($id = null) { if (empty($this-data)) { if (!$id) { $this-Session-setFlash('Invalid id for Entry'); $this-redirect('/entries/index'); } $this-data = $this-Entry-read(null, $id); } else { //$this-cleanUpFields(); if ($this-Entry-save($this-data)) { $this-Session-setFlash('The Entry has been saved'); $this-redirect('/entries/index'); } else { $this-Session-setFlash('Please correct errors below.'); } } } function delete($id = null) { if (!$id) { $this-Session-setFlash('Invalid id for Entry'); $this-redirect('/entries/index'); } if ($this-Entry-del($id)) { $this-Session-setFlash('Record deleted successfully'); $this-redirect('/entries/index'); } } } ? how to upload files from this code --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
file uploading in cake php
In my add view i have one form which contain file upload option i want to send all the values of form in one table but file upload option is displaying error like array to string conversion because the query is like that (insert into enteries(section,list,submenu,file) values ('shopping','list','sub',array)) why file field is having array as a value how to do file uploading from a form in cakephp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: file uploading in cake php
Have you tried printing the array to see what it contains? The array holds everything that $_FILE[] normally would. Use these values to upload your file, then set the variable to the name of the file or whatever you want inserted into the database. Cake does not have an automagic way to handle file uploads, it takes a couple of lines in the controller to take care of this. Google cakephp file upload for more examples. http://letmegooglethatforyou.com/?q=cakephp+file+upload On Dec 26, 11:50 am, mona poojapinj...@gmail.com wrote: In my add view i have one form which contain file upload option i want to send all the values of form in one table but file upload option is displaying error like array to string conversion because the query is like that (insert into enteries(section,list,submenu,file) values ('shopping','list','sub',array)) why file field is having array as a value how to do file uploading from a form in cakephp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: file uploading in cake php
thanks for the reply but when i click on add button to submit the form value in the database it is displaying the error like array to string conversion something like that how to print the value of array you me the above link but in all that page file uploading having different table different controller so can i make new table for file uploading and but i want to store file data in my main table enteries how can i do that --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: file uploading in cake php
I'd like to help, but It's way too late for me to be reading that bad of a run-on sentence. Could you try rephrasing the question with some punctuation? On Dec 26, 10:04 pm, mona poojapinj...@gmail.com wrote: thanks for the reply but when i click on add button to submit the form value in the database it is displaying the error like array to string conversion something like that how to print the value of array you me the above link but in all that page file uploading having different table different controller so can i make new table for file uploading and but i want to store file data in my main table enteries how can i do that --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---