| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| SQLdumpster.com | Enctype Hey. I'm writing a PHP upload file. However, when I add .. enctype='multipart/form-data' .. to the form tag, none of the $_POST variables work. I think this is a common problem but how do I get around this? Thanks Solved this by using GET instead of POST. But file uploads are still no worky http://www.ewno.com/submit.phps http://www.ewno.com/fileupload.phps help is very much appreciated
__________________ !!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!! Free Databases for your Website | All Things Playstation 3 Website Design Books | Music While You Work? | Computer Gadgets Last edited by miseria; 02-05-2006 at 03:04 PM. |
| |
| | #2 (permalink) |
| Domains my Dominion | I'm not sure it has anything to do but you should normally use double quotes in your HTML instead of singles: PHP Code: Also another remark: you should not automatically do addslashes to your form fields as it may depend on your server configuration. Your scripts should check magic_quotes status and behave accordingly. Otherwise porting your scripts to another host will be a nightmare (you will have to rewrite the code).
__________________ Buy now - MassDeveloper.com $500 |
| |
| | #3 (permalink) |
| SQLdumpster.com | Thanks for taking a look. All the other scripts work perfectly and so did this one until adding the enctype attribute.
__________________ !!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!! Free Databases for your Website | All Things Playstation 3 Website Design Books | Music While You Work? | Computer Gadgets |
| |
| | #4 (permalink) |
| Domains my Dominion | Could it be a browser issue ? http://bugs.php.net/bug.php?id=22612 Give it a try with another browser.
__________________ Buy now - MassDeveloper.com $500 |
| |
| | #5 (permalink) |
| SQLdumpster.com | Thanks for the advice. Problem exists with IE6 too
__________________ !!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!! Free Databases for your Website | All Things Playstation 3 Website Design Books | Music While You Work? | Computer Gadgets |
| |
| | #6 (permalink) |
| SQLdumpster.com | Also, is there a way of renaming files with a unique name before they are uploaded?
__________________ !!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!! Free Databases for your Website | All Things Playstation 3 Website Design Books | Music While You Work? | Computer Gadgets |
| |
| | #7 (permalink) | |
| Professional Monkey | Quote:
i would change your form method to "post" rather than "get"
__________________ [http://www.webmasterwords.com/python-split-and-join-examples]Python Tutorials[/url] | |
| |
| | #8 (permalink) |
| SQLdumpster.com | Yeah, that's the old script. The new one works but once again, other POST variables are empty.
__________________ !!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!! Free Databases for your Website | All Things Playstation 3 Website Design Books | Music While You Work? | Computer Gadgets |
| |
| | #10 (permalink) |
| SQLdumpster.com | Thanks but still same problem
__________________ !!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!! Free Databases for your Website | All Things Playstation 3 Website Design Books | Music While You Work? | Computer Gadgets |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |