Thanks a lot dude, but i've worked it out.i needed to simply change...
$file_name = $_FILES["Image"]["name"];
$sql = "UPDATE tablename
SET image_name=('{$file_name}')";
//I had been writing the final line of code as...
SET image_name=$file_name";
// By adding all the ('{ seems to have...
I am trying to update and store in mysql the file name of an uploaded file stored within the array
$_FILES['userfile']['name'].
However if you try and update with $_FILES['userfile']['name']... You aren't allowed.
If try and update mysql using... print $_FILES['userfile']['name'] you end up...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.