<div>I am running into a brand new issue today that I can&#39;t, for the life of me, figure out. I wrote a standard page to insert data into a MySQL table using Z SQL methods from a form like I always have but for some strange reason it&#39;s running the same query twice, thus adding a duplicate entry. </div>


<div> </div>
<div>I have confined the original code in it&#39;s own document, checked, double checked, and still no avail. Here&#39;s the code for the page: </div>
<div> </div>
<div>&lt;dtml-var frame_header&gt;</div>
<div>&lt;dtml-if addnewstatus&gt;<br>  &lt;dtml-try&gt;<br>    &lt;dtml-call &quot;RootSQLMethods.admin.Status_Add(_.None,_)&quot;&gt;<br>    &lt;dtml-call &quot;RESPONSE.redirect(BASE2+&#39;/statuses&#39;)&quot;&gt;<br>

  &lt;dtml-except&gt;<br>    &lt;p&gt;Error while submitting! Status not added.&lt;/p&gt;<br>    &lt;br&gt;Error type: &lt;dtml-var error_type&gt;<br>    &lt;br&gt;Error value: &lt;dtml-var error_value&gt;<br>  &lt;/dtml-try&gt;<br>

&lt;/dtml-if&gt;</div>
<div>&lt;form action=&quot;&amp;dtml-URL;&quot; method=&quot;post&quot;&gt;<br>  &lt;table class=&quot;tborder&quot; align=&quot;center&quot; width=&quot;30%&quot; cellspacing=&quot;0&quot; &gt;<br>    &lt;tr&gt;&lt;td class=&quot;tcat&quot; align=&quot;center&quot; colspan=&quot;2&quot; style=&quot;font-size: 12pt;&quot;&gt;Add New Status&lt;/td&gt;&lt;/tr&gt;<br>

    &lt;tr&gt;&lt;td width=&quot;35%&quot; align=&quot;right&quot;&gt;&lt;b&gt;Name:&lt;/b&gt;&lt;/td&gt;&lt;td width=&quot;65%&quot;&gt;&lt;input type=&quot;text&quot; name=&quot;name_add&quot; size=15&gt;&lt;/td&gt;&lt;/tr&gt;<br>

    &lt;tr&gt;&lt;td width=&quot;35%&quot; align=&quot;right&quot; valign=&quot;top&quot;&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;/td&gt;&lt;td width=&quot;65%&quot;&gt;&lt;textarea name=&quot;description_add&quot; cols=25 rows=4&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;<br>

    &lt;tr&gt;&lt;td width=&quot;35%&quot; align=&quot;right&quot;&gt;&lt;b&gt;Sort:&lt;/b&gt;&lt;/td&gt;&lt;td width=&quot;65%&quot;&gt;&lt;input type=&quot;text&quot; name=&quot;sort_add&quot; value=&quot;5&quot; size=1&gt;&lt;/td&gt;&lt;/tr&gt;<br>

    &lt;tr&gt;&lt;td align=&quot;center&quot; colspan=&quot;2&quot;&gt;&lt;hr&gt;&lt;/td&gt;&lt;/tr&gt;<br>    &lt;tr&gt;<br>      &lt;td&gt;&lt;input type=&quot;hidden&quot; name=&quot;addnewstatus&quot; value=&quot;1&quot;&gt;&lt;/td&gt;<br>

      &lt;td&gt;<br>        &lt;button class=&quot;button&quot; onclick=&quot;this.form.submit()&quot;&gt;Add Status&lt;/button&gt;&amp;nbsp;&amp;nbsp;<br>        &lt;button class=&quot;button&quot; onclick=&quot;window.location = &#39;&lt;dtml-var BASE2&gt;/statuses&#39;; return false;&quot;&gt;Cancel&lt;/button&gt;<br>

      &lt;/td&gt;<br>    &lt;/tr&gt;<br>  &lt;/table&gt;<br>&lt;/form&gt;</div>
<div>&lt;dtml-var frame_footer&gt;</div>
<div> </div>
<div>I can run the SQL Method by itself and it works just fine (only inserting it once) but when run as a separate page it adds the two. </div>
<div> </div>
<div>Any assistance is appreciated</div>