PHP class
Implemented by reading a TXT document for product presentation, how to add product description according to different product categories?
Plantslist.txt:
$plantsclassify =array ("Product category", "Product category", "Product Type");
$ product Category =array ("Product name", "Introduction", Price), Array ("Name", "Introduction", Price), Array ("Name", "Introduction", price));
$ product Category =array ("Product name", "Introduction", Price), Array ("Name", "Introduction", Price), Array ("Name", "Introduction", price));
$ product Category =array ("Product name", "Introduction", Price), Array ("Name", "Introduction", Price), Array ("Name", "Introduction", price));
?>
Include ("Plantslist.txt");
foreach ($plantsclassify as $classify)
{
echo "$classify";
}
echo "View shopping cart";
if (isset ($_get["Catalog"]))
{
$catalog =$_get["Catalog"];
$_session["Catalog"]= $catalog;
echo "
";
echo "
"; echo "
"; echo "
Plant name | "; echo "
More information | "; echo "
Price | "; echo "
Buy | "; echo "
"; foreach ($ $catalog as $plants) {echo '
"; foreach ($plants as $val) {echo '
$val | "; } echo "
| "; echo "
"; } echo "
"; echo "
| "; echo "
"; echo "
";
echo "";
}
if (Isset ($_get["Success"))
{
if ($_get["Success"]==0)
{
echo "Alert (' Please choose plants ')";
}
if ($_get["Success"]==1)
{
echo "alert (' added to cart! ')";
}
}
?>