samedi 6 décembre 2014

Show the Product details by click the Product image using PHP and My SQL


Vote count:

0




all the product details will be stored by Category wise.



for eg. Nokia Category , Samsung Category

if i add product with nokia Category it will store the image as

imgupload/CategoryImage/1/orginal/image.jpg

here the "1 folder" will be nokia and same "2 folder" will be samsung. these folder no. will be assigned by itself using "id"

My error was i can't able to get the "Category Id "

<img src="imgupload/CategoryImage/<?php echo $catId; ?>/orginal/<?php echo $catImageName; ?> ">

in the image link

<?php
if(isset($_GET['id']))
{
$id = $_GET['id'];
$categoryImageModel = new CategoryImageModel();
$result = $categoryImageModel->categoryImageSelect("status=1 AND id='$id'",'id','ASC','');
$row = mysql_fetch_array($result);
$count = mysql_num_rows($result);
$id = $row['id'];
$catImageName = $row['imageName'];
$imageTitle = $row['imageTitle'];
$price = $row['price'];
$description = $row['description'];
}
?>
<img src="imgUploads/categoryImage/<?php echo $catId; ?>/original/<?php echo $catImageName; ?>" />


this line only the main problem. the category id not getting in the image path. all the product details will be stored by Category wise.


for eg. Nokia Category , Samsung Category


if i add product with nokia Category it will store the image as


imgupload/CategoryImage/1/orginal/image.jpg


here the "1 folder" will be nokia and same "2 folder" will be samsung. these folder no. will be assigned by itself using "id"


My error was i can't able to get the "Category Id "


/orginal/ "> in the image link error was:


when i click the product image the full details of the product was shown in the next page, but the image was not displayed.



asked 16 secs ago







Show the Product details by click the Product image using PHP and My SQL

Aucun commentaire:

Enregistrer un commentaire