upload not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: upload not working (/showthread.php?tid=49137) |
upload not working - El Forum - 02-09-2012 [eluser]junaids[/eluser] Hi, I am trying to develop a product adding controller. I am trying to insert product data in the database and the product image to be uploaded to the images directory. The data is inserted correctly into the db but the image is not uploaded in the directory. below is my code VIEW Code: <!DOCTYPE HTML> Here is my Controller Code: <?php and MODEL Code: <?php Need help..Why are the images not uploaded in the directory? upload not working - El Forum - 02-09-2012 [eluser]junaids[/eluser] may be in my view, I have opened two forms with form_open() command..one is for the product data and the other for is the form_open_multipart. And I have only one form_close() statement!!! upload not working - El Forum - 02-09-2012 [eluser]junaids[/eluser] I added another form_close() statement but it is still not working!! upload not working - El Forum - 02-09-2012 [eluser]meigwilym[/eluser] You've presently got two forms, only one of which is submitting (the first) so only this data is being sent to the server. Combine both into one form, try again then come back with any difficulties. Mei upload not working - El Forum - 02-09-2012 [eluser]InsiteFX[/eluser] Because the directory should be in your root uploads application system Then your path is './uploads' upload not working - El Forum - 02-09-2012 [eluser]junaids[/eluser] @MEI I have removed the multi_part form and still the image is not uploaded.. @InsiteFX I have images folder instead of uploads and its in the same directory as you described. upload not working - El Forum - 02-09-2012 [eluser]meigwilym[/eluser] You need to change the form tag to multi_part for it to work. Mei upload not working - El Forum - 02-09-2012 [eluser]junaids[/eluser] @mei Thanx..it helped |