Enctype Problem

liunx

Guest
I have created forms where I am uploading files and text together. My form tag looks something like this:<br />
<form method="post" enctype="multipart/form-data" action="filename"><br />
<br />
When i test the form on my local, it works fine, but when I try to submit the form on the live site I get a problem. It seems that none of the form data gets passed when "enctype=mulitpart/form-data" is declared. When I remove enctype from the form tag, the form data is passed (but not the uploaded file though). <br />
<br />
So why does it work on my local and not on the server? Do I need to get in touch with my server and get him to sort it out or is there another option I can use?<br />
<br />
I have used the same code for other sites which run fine once live, so i don't see how it is my problem. Am I right?<br />
<br />
Alan<!--content-->Originally posted by Cowboy Killer <br />
I have created forms where I am uploading files and text together. My form tag looks something like this:<br />
<form method="post" enctype="multipart/form-data" action="filename"><br />
<br />
When i test the form on my local, it works fine, but when I try to submit the form on the live site I get a problem. It seems that none of the form data gets passed when "enctype=mulitpart/form-data" is declared. When I remove enctype from the form tag, the form data is passed (but not the uploaded file though). <br />
<br />
So why does it work on my local and not on the server? Do I need to get in touch with my server and get him to sort it out or is there another option I can use?<br />
<br />
I have used the same code for other sites which run fine once live, so i don't see how it is my problem. Am I right?<br />
<br />
Alan <br />
<br />
When it says, 'action=filename', that doesn't look right--usually I would have it like... action='uploadfile.php'. But that's all I can cite out right because I don't know very much about enctypes.<br />
<br />
When you define<br />
<br />
action=filename><br />
<br />
--it doesn't seem like a valid form syntax and thus, it should be giving its action to some file that is open to receiving commands (ex: upload.php with functions of inserting into database or folder). Oh yeah, it could be $filename instead though (in php)! :)<br />
<br />
Note: action= always needs a destination [to a file, etc].<br />
<br />
Hope this helps, mate!<!--content-->I know that action always needs to be a destination - I just didn't write the actual filename when i posted my question. In my code, i do have a filename there, so i assure you the 'action' parameter is not the problem. <br />
Thanks for the suggestion though. Let me know if you think of anything else.<!--content-->run a phpinfo(); file and see if FILE_UPLOAD is disabled.<br />
<br />
If that's disabled, then that's the problem....or maybe it's not...I honestly don't know because I'm just spitting out ideas hehe :)<br />
<br />
Good luck though :)<!--content-->I think you might have nailed it with that one. Under file_uploads it said 'no value'. I guess you'll be seeing another post here if that doesn't work. <br />
Thanks for your help. I'll let you know how I go.<!--content-->Ah, excellent ;) Let's hope it works once you resolve some issues with your server admins :)<!--content-->
 
Back
Top