A
Anonymous
Guest
I finally have a flatfile system (Thanks to Jay), and it's all sorted and organized by product number like this:
|productnr|name|description|LongDescription||||||
Exaple:
|234|Fish|Cod|Wery good cod from Norway|
|43|Fish|Salmon||
|9|Boat|Speed boat|Fast speed boat, not good for fishing|
|12|Mercury|40hp||
And I have a folder with images, and there is one possible image for each product named with the number of the product:
/images
234.jpg
43.jpg
In the table where I dispaly the products I want php to detect wich icon.gif to wiew...
At $productnuber 234 I have both $LongDescription, and 234.jpg, so I want PHP to display the Picture and text icon like:
<a href='details'><img src='PictTextIcon.gif'></a>
At $productnuber 43 I have no $LongDescription, but i have 234.jpg, so I want PHP to display the Picture icon like:
<a href='details'><img src='Pict.gif'></a>
At $productnuber 9 I have $LongDescription, but no image, so I want PHP to display the text icon like:
<a href='details'><img src='Text.gif'></a>
At $productnumber 12 I have no LongDescription or image, so I want PHP to only display:
I have been locking trough diferent cripts but I gave up... I got confused. But I think it's somting like:
if ( :?: ($icon)){
print "<a href='details'><img src='PictTextIcon.gif'></a>";
}
if ( :?: ($icon)){
print "<a href='details'><img src='Pict.gif'></a>";
}
if ( :?: ($icon)){
print "<a href='details'><img src='Text.gif'></a>";
}
if ( :?: ($icon)){
print " ";
}
:lol: :lol: ...... Hey! Stop laughing!!! :? It's not fun! I know I'm a NEWBEE
.
"Take a brake, place give this newbe 2 minutes of your life ...and a dime for a cup of "coffee":roll:"
;]-
|productnr|name|description|LongDescription||||||
Exaple:
|234|Fish|Cod|Wery good cod from Norway|
|43|Fish|Salmon||
|9|Boat|Speed boat|Fast speed boat, not good for fishing|
|12|Mercury|40hp||
And I have a folder with images, and there is one possible image for each product named with the number of the product:
/images
234.jpg
43.jpg
In the table where I dispaly the products I want php to detect wich icon.gif to wiew...
At $productnuber 234 I have both $LongDescription, and 234.jpg, so I want PHP to display the Picture and text icon like:
<a href='details'><img src='PictTextIcon.gif'></a>
At $productnuber 43 I have no $LongDescription, but i have 234.jpg, so I want PHP to display the Picture icon like:
<a href='details'><img src='Pict.gif'></a>
At $productnuber 9 I have $LongDescription, but no image, so I want PHP to display the text icon like:
<a href='details'><img src='Text.gif'></a>
At $productnumber 12 I have no LongDescription or image, so I want PHP to only display:
I have been locking trough diferent cripts but I gave up... I got confused. But I think it's somting like:
if ( :?: ($icon)){
print "<a href='details'><img src='PictTextIcon.gif'></a>";
}
if ( :?: ($icon)){
print "<a href='details'><img src='Pict.gif'></a>";
}
if ( :?: ($icon)){
print "<a href='details'><img src='Text.gif'></a>";
}
if ( :?: ($icon)){
print " ";
}
:lol: :lol: ...... Hey! Stop laughing!!! :? It's not fun! I know I'm a NEWBEE
"Take a brake, place give this newbe 2 minutes of your life ...and a dime for a cup of "coffee":roll:"
;]-