Databse connectivity in flash - TechRepublic
General discussion
February 5, 2009 at 12:23 AM
prakriti_mehindroo

Databse connectivity in flash

by prakriti_mehindroo . Updated 17 years, 5 months ago

on(press, release)
{
name=NAME_TXT.text;
mail=MAIL_TXT.text;
comment=COMMENT_TXT.text;
if (name eq “”)
{
gb_status.text = “Required: Name”;
}
else if (mail eq “”)
{
gb_status.text = “Required: Email Address”;
}
else if (!mail.length || mail.indexOf(“@”) == -1 || mail.indexOf(“.”) == -1)
{
gb_status.text = “Required: Valid Email Address”;
}
else if (comment eq “”)
{
gb_status.text = “Required: Comments”;
}
else
{
gb_status.text = “Please wait…”;
newEntry = new LoadVars();
newEntry.ref = this;
newEntry.submit = “Yes”;
newEntry.name = name;
newEntry.email = mail;
newEntry.comment = comment;
newEntry.sendAndLoad(“http://thewebart.in/portfolio/GuestBook.php/GuestBook.php”
,newEntry,”POST”);
newEntry.onLoad = function(success){
if(success){
gb_status.text = this.gb_status;
}
else
{
gb_status.text = “nope”;
}

// Clear fields
NAME_TXT.text = “”;
MAIL_TXT.text = “”;
COMMENT_TXT.text = “”;

}
}

}

Plaese tell what is the error in this code

This discussion is locked

All Comments