I cant reach the post value |
[eluser]barisv[/eluser]
Hi, I am submitting the form as you see in the below. It works for image uploading but I need to get userfile to create an url to add it to the database. But returns nothing when I write $this->input->post('userfile'); Why I cant reach the value of userfile ? or does it become empty before I reach it ? Code: <form action="http://localhost/adminpanel/admin/addreferans" method="post" accept-charset="utf-8" enctype="multipart/form-data"> Thanks in advance,
[eluser]InsiteFX[/eluser]
Maybe it needs something in the value field. InsiteFX
[eluser]cahva[/eluser]
Filename is not in the $_POST array. Its in the $_FILES array and thats why it cant be found in post. If you use the File uploading class, you can use $this->upload->data() to get the information. Read more in the link to userguide. If you dont use file uploading class, you can get the filename using: Code: $fname = $_FILES['userfile']['name'];
[eluser]barisv[/eluser]
I am using File uploading class. Thanks for your informative reply, Cahva. Thats what I needed. I have missed that part. Probably I should read more to userguide. Also thank you InsiteFX. |
Welcome Guest, Not a member yet? Register Sign In |