simple login authentication
. . .
function login_button_clicked(object sender, string extra)
{
array clist=[];
string custNm=.UserName.textValue();
string custpass=.Password.textValue();
string sql = "select count(*) counts from workflow_users where username='$custNm' and password='$custpass'";
clist=ObjRunObject.rawQuery(sql);
clist.each() using(comp)
{
if (comp.counts==1)
{
Request.current().location("AdminPanel");
}
else
{
println("User Name or Password missmatch ! please check");
}
};
}
data save in db
string custNm=.CustomerName.textValue();
string custAdd=.CustomerAddress.textValue();
string sql = "insert into workflow_customertest (name,address) values('$custNm','$custAdd')";
Database.query(sql);
img border="0" style="vertical-align: top;" src="/wf/Skeleton.app/Resources/Templates/Master.template/Images/attached_file.gif"
n.b. always place code inside <> as it is removed for some technical issue.
. . .
function login_button_clicked(object sender, string extra)
{
array clist=[];
string custNm=.UserName.textValue();
string custpass=.Password.textValue();
string sql = "select count(*) counts from workflow_users where username='$custNm' and password='$custpass'";
clist=ObjRunObject.rawQuery(sql);
clist.each() using(comp)
{
if (comp.counts==1)
{
Request.current().location("AdminPanel");
}
else
{
println("User Name or Password missmatch ! please check");
}
};
}
data save in db
string custNm=.CustomerName.textValue();
string custAdd=.CustomerAddress.textValue();
string sql = "insert into workflow_customertest (name,address) values('$custNm','$custAdd')";
Database.query(sql);
image in ferite
code:img border="0" style="vertical-align: top;" src="/wf/Skeleton.app/Resources/Templates/Master.template/Images/attached_file.gif"
n.b. always place code inside <> as it is removed for some technical issue.