How To Upload File Using Php November 30, 2022 Post a Comment plz help me I dont know how to make this work Your Photo: Solution 1: Can u try it? $path = $_FILES['file']['name']; if (file_exists($path)) { echo 'File already exists!'; } else { move_uploaded_file($_FILES['file']['tmp_name'], $path); } Copy Solution 2: I think you are missing something like this: move_uploaded_file($_FILES["file"]["tmp_name"], "../img/profiles/" . $_FILES["file"]["name"]); echo "Stored in: " . "../img/profiles/" . $_FILES["file"]["name"]; Copy Solution 3: use move_uploaded_file(file,location) you need to change your file field name to file instead photo <input type="file" name="file" size="25" /> Copy if don't change than use code like below to upload it.Baca JugaChrome Css 3 Transition Not SmoothHow To Send An Html Form To An EmailPropagating View's Dirty State To The Containing Form move_uploaded_file($_FILES["photo"]["tmp_name"], "location/to/save/photo/with/extension"); Copy Solution 4: <input type="file" name="photo" size="25" /> Copy should be like <input type="file" name="file" size="25" /> Copy because you are looking for $_FILES["file"] not $_FILES["photo"]; make change to either your input name or the $_FILE[] as you wish. Share You may like these postsFind And Edit Comment Element Of Html With PhpStop The Video When Play Another VideoSubmit Button Needs To Be Clicked Twice To Get My Results From Radio Buttons In A Php ScriptPhp Curl Get Html And Js Render Post a Comment for "How To Upload File Using Php"
Post a Comment for "How To Upload File Using Php"