move_uploaded_file gives
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
<?php
/***********************************INSERT************************************************/
if($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['submit']) == 'POST'){
$valid_formats = array("jpg", "png", "gif", "bmp");
$name = $_FILES["img"]["name"];
$size = $_FILES["img"]["size"];
//$temp = explode(".",$name);
//$ext = end($temp);
$target ="/uploads/$_FILES["img"]["tmp_name"];
move_uploaded_file($_FILES["img"]["tmp_name"],$target_path);
}
?>
<form role="form" method="post" action="clients.php" enctype="multipart/form-data">
<table width="70%" height="30%" align="center">
<tr>
<th>Choose Photo</th>
<td><input type="file" name="img" id="file"></td>
</tr>
<tr>
<td><input type="submit" name="submit" value="POST" /></td>
</tr>
</table>
</form>