javascript - uploaded files are null -


i'm trying upload image via form crop in php file, when upload file doesn't seem upload.

here's form:

<form id="uploadform" action="cropnsend.php" method="post" enctype=”multipart/form-data”>             <input type="text" id="inputname" name="inputname" value="name"><br>             <input type="text" id="inputtel" name="inputtel" value="telefon"><br>             <input type="text" id="inputmail" name="inputmail" value="email"><br>             <input type="text" id="inputadr" name="inputadr" value="adresse"><br>             <input type="file" id="inputpic" name="inputpic"><br>             <input id="x" type="hidden" name="x" value="130">             <input id="y" type="hidden" name="y" value="83">             <input id="w" type="hidden" name="w" value="155">             <input id="h" type="hidden" name="h" value="155"> </form> 

i submit form woth javasript vai $("#uploadform").submit();

everything seems upload fine, file.

here's php code:

session_start();  define("filerepository", "./");  if ($_server['request_method'] == 'post') {        if(isset($_post["inputname"]) && isset($_post["inputmail"]) &&     isset($_post["inputadr"]) && isset($_post["inputtel"]))   {        $_session["x"] = $_post["x"];     $_session["y"] = $_post["y"];     $_session["width"] = $_post["w"];     $_session["height"] = $_post["h"];     $_session["inputname"] = $_post["inputname"];     $_session["inputmail"] = $_post["inputmail"];     $_session["inputtel"] = $_post["inputtel"];     $_session["inputadr"] = $_post["inputadr"];      var_dump($_files);     echo $_files["inputpic"]["name"];     echo $_files["inputpic"]["type"];     echo $_files["inputpic"]["size"];    } 

var_dump($_files) array(0).

hope can me

the quotes wrong enctype

<form id="uploadform" action="" method="post" enctype=”multipart/form-data”> 

try this:

<form id="uploadform" action="" method="post" enctype="multipart/form-data"> 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -