I have an image upload script as follows:
$product = $_POST['name'];
$detail = $_POST['detail'];
$price = $_POST['price'];
$class = $_POST['class'];
$category = $_POST['category'];
$name = $_FILES['image']['name'];
$tmpName = $_FILES['image']['tmp_name'];
if ($name) {
//start upload process
$location = "images/" . $name;
move_uploaded_file($tmpName, $location);
}
$query="INSERT INTO shop_products VALUES ('','$product','$location','$detail','$price','$class','$category','yes')";
$result=mysql_query($query) or die(mysql_error());
header("location: ../admin/index.php");
and the display of the image is as follows:
<img class="item-img" src="scripts/images/<? echo $image; ?>" />
As you can see if you go to ltyboards.com/boards, the document source provides the appropriate file name for the image, and the image does exist on the server, but nothing is displayed. Ideas?
It just looks like your path is wrong
scripts/images/images/should be
scripts/images/