I am trying to upload a photo to a directory on the website and I am getting the following error:
Warning: move_uploaded_file(photos/brandon.jpg): failed to open stream: Permission denied in /home/wgbubzrh/public_html/toyshare/admin/add_emp.php on line 13
Warning: move_uploaded_file(): Unable to move '/tmp/phpToHxuW' to 'photos/brandon.jpg' in /home/wgbubzrh/public_html/toyshare/admin/add_emp.php on line 13
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '')' at line 1
This is what I have in my code:
<?php
$image_tempname = $_FILES['image_filename']['name'];
$ImageDir = "photos/";
$ImageName = $ImageDir . $image_tempname;
move_uploaded_file($_FILES['image_filename']['tmp_name'], $ImageName);
?>
<html>
<form enctype="multipart/form-data" action="add_emp.php" method="post" name="frmThis" onsubmit="return submitForm();">
Upload Photo: <input name="image_filename" type="file" id="image_filename" class="input">
<input type="submit" value="Add Employee" class="button">
</form>
</html>
Can someone please help me!!