I have a form that contains an html file browse button ( <input type=file />
). User select a file by clicking browse button and submit the form. On form submission new php script (submitToServer.php) is called that use that file to upload it to the server.
Now I want to upload that file without using browse button because file name and path is always same when we upload. How can I do this?
currently submitToServer.php file handle file using browse button like this:
$errorCode = $_FILES['claimsfile']['error'];
$claimsFileLocation = $_FILES["claimsfile"]["tmp_name"];
$claimsFileName = $_FILES["claimsfile"]["name"];
$claimsFilePointer = fopen($_FILES["claimsfile"]["tmp_name"], "r");