Here is the code i'm using to upload some info to my db, the image just doesnt seem to be getting to the folder, hence it is not being displayed, can any body help here? It is getting the text data from the form but not the image.....confused
<body>
<form enctype="multipart/form-data" method="post" action="<?php echo $PHP_SELF ?>">
year<br>
<input type="Text" name="name" size="25">
<br>
make<br>
<input type="Text" name="description" size="25">
<br>
price<br>
<input type="Text" name="price" size="25">
<br>
picture<br>
<input type="File" name="image" size="25">
<br><br>
<input type="submit" name="submit" value="Upload">
</form> <?php
if (isset($submit)) {
$db = mysql_connect("localhost","antiques");
mysql_select_db("antiques",$db);
$sql = "INSERT INTO general (name,description,price,image_name) ".
"VALUES ('$name,$description,$price,$image_name')";
exec("cp $image antiques/images/$image_name");
echo "name: $name<br>\n";
echo "description: $description<br>\n";
echo "price: $price<br>\n";
echo "temp file: $image<br>\n";
echo "file name: $image_name<br>\n";
echo "file size: $image_size<br>\n";
echo "file type: $image_type<br>\n";
echo "<br>\n";
echo "<img src=images/$image_name><br>\n";
}
?>
</body>