Dynadot โ€” .com Transfer

Enctype

SpaceshipSpaceship
Watch

SiKing

Registered MemberEstablished Member
Impact
6
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
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
I'm not sure it has anything to do but you should normally use double quotes in your HTML instead of singles:
PHP:
<form method="get" action="submit.php" enctype="multipart/form-data">l

Are you able to make POST request on that directory using other pages than this one ?

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).
 
0
•••
Thanks for taking a look. All the other scripts work perfectly and so did this one until adding the enctype attribute.
 
0
•••
0
•••
Thanks for the advice. Problem exists with IE6 too
 
0
•••
Also, is there a way of renaming files with a unique name before they are uploaded?
 
0
•••
miseria said:
Also, is there a way of renaming files with a unique name before they are uploaded?

just change the file name variable in $target_path (line 5)

i would change your form method to "post" rather than "get"
 
0
•••
Yeah, that's the old script. The new one works but once again, other POST variables are empty.
 
0
•••
use $_REQUEST[variablename] instead of $_POST
 
0
•••
Thanks but still same problem
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back