-->-->-->-->-->-->--> require '/usr50/home/retrovox/public_html/manage/php-lib/fnRetrovoxParseXml.php'; $sDataPath = "/usr50/home/retrovox/public_html/product-data"; $sProductId = $_POST["product-id"]; $sFilePath = "$sDataPath/product-$sProductId.xml"; if ($sProductId == '') { echo " Retrovox Product Display, (No product specified) ${S-RETROVOX-TITLE-IMAGE-HTML}

No product was specified

You did not specify any product to update (using the product-id)

This situation probably indicates an error in the script edit-product-form.php
View All Product Files (XML) "; exit; } //-- if no product if (file_exists($sFilePath)) { echo " Retrovox Product Edit, (The item already exists) ${S-RETROVOX-TITLE-IMAGE-HTML}

The item already exists

There is already a product on the Retrovox site with the product-id which you just specified.


This probably indicates an error is the script file add-product-form.php
To edit an existing product you should use the script edit-product-form.php View All Products "; exit; } //-- if product already exists if (!is_writable(dirname($sFilePath))) { echo " Retrovox Product Display, (The product directory is not writable) ${S-RETROVOX-TITLE-IMAGE-HTML}

The product directory is not writeable

The directory containing the data for the product which you specified is not writable. The permissions for this file will need to be altered by the system administrator


"; //-- exit; } //-- if product directory not writeable //-- Construct the XML and write the data to file // $sProductData = " \n"; foreach ($_POST as $key => $value) { $sProductData = $sProductData."<$key>".htmlspecialchars($value)." \n"; } $sProductData = $sProductData." \n"; $fileHandle = fopen($sFilePath, "w"); fwrite($fileHandle, $sProductData); fclose($fileHandle); $aaProductData = fnRetrovoxParseXml($sProductData); //--<--<--<--<--< ?> Retrovox Add a Product

The new product was added to the database

-->-->-->-->-->-->--> //-- for debugging //



   foreach ($aaProductData as $key => $value)
   {
      echo "
\n"; } //-- foreach //--<--<--<--<--<--<--<--< ?>
The following data was saved
$key$value
  1. View the web-page for this product
  2. View the raw XML data for this product
  3. View the XML data for this product in a web-page
  4. Edit the data for this product (Administrators Only)