$_FILES not being recognised - Nothing working |
[eluser]Funky Fresh[/eluser]
Hey All, Im having major problems with my CI .... I have a very basic form in my view, which has the following code Code: <?php echo form_open_multipart($this->uri->uri_string()); ?> In my controller i have the following Code: if(isset($_FILES['mpfile'])){ The problem is, everytime i run i i see the echo'd message, even when there is no file selected in the file area ... I have tried everything to get it working as you can see from my post here -> http://stackoverflow.com/questions/43381...20#4338220 This is getting on my nerves as i have been working on it for about 6 hours and still nothing. Cheers,
[eluser]smilie[/eluser]
If I may ask, but why is the input array?! Remove [] from the name and try again :-) Also, take a look at the http://ellislab.com/codeigniter/user-gui...ading.html Cheers, Smilie
[eluser]Funky Fresh[/eluser]
Hey, Iam using several different inputs that need to be in an array, but as a test, i did take it out, and it still didnt recognise it. Basically for the first test, i just need to see if a file has been chosen for upload .... but whatever i try wont work
[eluser]smilie[/eluser]
Could you tru instead of: Code: <?php echo form_open_multipart($this->uri->uri_string()); ?> Also, try: Code: if(count($_FILES('mpfile') > 0 Cheers, Smilie
[eluser]Funky Fresh[/eluser]
Just tried that .... it returns 'THIS IS A TEST' on both occasions :S
[eluser]Funky Fresh[/eluser]
Is this the only helper i need to get forms working? $this->load->helper( 'form' ); |
Welcome Guest, Not a member yet? Register Sign In |