Hi friends,
i creating a simple upload script. But i am having problem uploading the file here is the form.
<body>
<h3 align=''>Image Upload</h1><br>
<form id="loginForm" name="loginForm" method="post" action="test_submit.php" onsubmit='return validate(this)'>
<table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<th>Select </th>
<td><input name="image_file" type="file" class="textfield" id="image_file" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Upload" /></td></tr><tr>
<td><br></td> </tr>
</table>
</form>
</body>
</html>
The upload script is
if($_POST['Submit'])
{
$target = "slideshow/";
$target = $target . basename( $_FILES['image_file']['name']) ;
if(move_uploaded_file($_FILES['image_file']['tmp_name'], $target))
{
echo "The file has been uploaded";
}
else {
echo "Sorry, there was a problem uploading your file.";
}
}