0

I have several forms on my site. When the form submits we insert the lead into a database as well as send an email to several people. To ensure leads are not getting lost in either process I am attaching an ID($tracker) to each lead submission. The ID is pulled from an XML file that increments +1 on each submission.

The issue I am having is the increments are skipping numbers. The list of tracker IDs that I have is 1,6,8,9,10,19,22,23,41,48,50,59,66,68,69,74,79,82. I DO NOT have more emails than database submissions or visa versa. Any suggestions as to why my XML increment may be skipping numbers.

Here is my XML file.

    <note>
    <data>82</data>
    <add>1</add>
    </note>

Here is my code that increments the data # on submission.

    $xml = simplexml_load_file($_SERVER['DOCUMENT_ROOT'] . '/includes/catch.xml');
    $xml->data = $xml->add + $xml->data;
    $tracker = $xml->data;

Thanks in advance for any help!

4

1 回答 1

0

我遇到的问题与在 XML 中增加的实际脚本无关。它与 mySQL 插入函数失败有关。即使数据库插入失败导致数字跳过,XML 也会继续增加。我现在有一个问题。

于 2012-10-29T14:49:51.733 回答