# sendAndLoad - duplicity record

**URL:** https://forum.kirupa.com/t/sendandload-duplicity-record/187264
**Category:** flash
**Created:** [April 27, 2006, 10:13pm UTC](https://forum.kirupa.com/t/sendandload-duplicity-record/187264 "2006-04-27T22:13:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jankratochvil](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jankratochvil/32/566_2.png) [@jankratochvil](https://forum.kirupa.com/u/jankratochvil)
#### Post date: [April 27, 2006, 10:13pm UTC](https://forum.kirupa.com/t/sendandload-duplicity-record/187264/1 "2006-04-27T22:13:51Z")

</div>

I use this code and send vars to the ASP -\> database.  
I click only once the submit btn, but I have 2 same records in my database.

What I have wrong?

```php
// bSubmit btn action
var submit_listener:Object = new Object ();
submit_listener.click = function (evt:Object)
{
	// send variables to ASP page and save new entry to database
	var result_lv:LoadVars = new LoadVars ();
	result_lv.onLoad = function (success:Boolean)
	{
		if (success)
		{
			trace (mySendVars.toString ());
			msg.text = "SENDED.";
		}
		else
		{
			msg.text = "NOT Sended.";
		}
	};
	var mySendVars:LoadVars = new LoadVars ();
	mySendVars.gname = gname.text;
	mySendVars.gmail = gmail.text;
	mySendVars.gfrom = gfrom.text;
	mySendVars.gmsg = gmsg.text;
	//
	mySendVars.sendAndLoad ("new_entry_guestbook.asp", result_lv, "POST");
};
bSubmit.addEventListener ("click", submit_listener);

```
