0

Hello and good day everyone! I am currently trying to figure out how to use a files variable like this:

$file = $_FILES['imgCompany']['tmp_name'];

and use it in a javascript function:

function someFunction() {
var file = "<?php echo $file; ?>"; //just an assumption, but does not work of course
}

Thank you! any help will be appreciated

paopao33
  • 107
  • 4
  • 13
  • `var file = "";` should work just fine. – Cerbrus Jul 06 '15 at 22:03
  • Possible duplicate of [How to pass variables and data from PHP to JavaScript?](http://stackoverflow.com/questions/23740548/how-to-pass-variables-and-data-from-php-to-javascript) – showdev Jul 06 '15 at 22:03

0 Answers0