topical media & game development
basic-ajax-03-managecart.php / php
<?php
session_register('Cart');
header('Content-Type: text/xml');
?>
<?php
_GET["book"];
_GET["action"];
if (MDA = action == "Add")
{
if (newitem] != "")
{
MDA[MDA[value;
MDA;
ECHO (toXml(MDA[_SESSION["Cart"] = MDA));
}
}
else
{
_SESSION["Cart"] = "";
ECHO (toXml(MDA[_SESSION["Cart"] = MDA));
}
function toXml(doc = new DomDocument('1.0');
doc->createElement('cart');
doc->appendChild(MDA as ItemName)
{
doc->createElement('book');
cart->appendChild(title = title = title);
doc->createTextNode(value = value);
doc->createElement('quantity');
book->appendChild(value2 = ItemName);
quantity->appendChild(strXml = strXml;
}
?>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.