Sorry for late reply .. While the form is posted, in the server side scripting you can use $_FILES super global variable to collect all information about the file uploaded by the user. It wlll have all info in array format ( use print_r($_FILES) or var_dump($_FILES) to look at that array ) .
For example: Array ( [file] => Array ( [name] => cake.jpg [type] => image/jpeg [tmp_name] => /tmp/hp1083.tmp [error] => 1 [size] => 24530 ) ) You can copy the file in tmp_name to the desired location. Or you can use move_uploaded_file to move it to the desired directory. Hope it till help you. On Wed, Aug 1, 2012 at 1:51 PM, rahul <[email protected]> wrote: > Thanks nikhil for your quick reply. > Would you mind telling me how to save images inside directory? > > > On Wednesday, August 1, 2012 12:15:36 PM UTC+5:30, Nikhil Agrawal wrote: >> >> It will be better if you can save the image inside *app/webroot/image/ >> *folder >> rather than saving the images in database . In datatbase you can save the >> name of images . >> >> If you will be saving it in database you have to worry the type of image >> and the size of image will can make the database huge. >> But, if you want to save it in database follow this link: >> http://vikasmahajan.wordpress.**com/2010/07/07/inserting-and-** >> displaying-images-in-mysql-**using-php/<http://vikasmahajan.wordpress.com/2010/07/07/inserting-and-displaying-images-in-mysql-using-php/> >> >> On Tue, Jul 31, 2012 at 10:16 PM, rahul <[email protected]>wrote: >> >>> Hi i am new to cakephp.I have created a registration form and i want >>> when i fill this form and select >>> an image for a person i can save information with image in >>> database.After saving information i will >>> be able to view that information along with that image. >>> >>> Can anyone help me? >>> >>> -- >>> 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. >>> >>> >>> >>> >> -- > 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 > [email protected] For more options, visit this group > at http://groups.google.com/group/cake-php > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
