Does anyone know how to manage the <input type="file" id="myFile" />
in javascript so I can send the file to a php code?
I have something like this:
<input type="file" id="myFile" />
<input type="button" value="FILE" onclick="useFile()" />
Then, in javascript I want to use the file the user uploaded because I want to use it in a PHP code.
How do I get the file and send it to php as a parameter?
function useFile() {
var myFile = document.getElementById("myFile"); //Does this work?
// then how do I send it to a php?
}
I hope someone could help me.
Thanks a lot.