Hi,
I’m creating a product database, and each product has a [B]Designer, Category [B]SubCategory
When the admin uploads an image, it’ll just put the image filename in the database because it’ll determine the location based on the Designer and the Category.
I ran into a snag while trying to create an [B]if statement [B]olddesignerid, olddesigner, oldcategoryid [B]oldcategory.
Here’s my code that totally does nothing ?
[code=php] if (($_POST[‘olddesignerid’] != $_POST[‘DesignerID’]) || ($_POST[‘oldcategoryid’] != $_POST[‘CategoryID’])) {
$OldDesignerFolder = strtolower(preg_replace(‘/W/’, ”, $_POST[‘olddesigner’]));
$OldCategoryFolder = strtolower(preg_replace(‘/W/’, ”, $_POST[‘oldcategory’]));
$Image = $row_Product[‘Image’];
rename(“../store-images/products/” . $OldDesignerFolder . “/” . $OldCategoryFolder . “/” . $Image, “../store-images/products/” . $DesignerFolder . “/” . $CategoryFolder . “/” . $Image);
}
Let me know if you see what I’m doing wrong.
Thanks,
Jesi