Hi all,
I’m new to PHP and scriptcase. I want to do some login availability checking during form_add_user using AJAX. Here is my code:
//AJAX check username availability
$login = {login};
$sql = “SELECT idusers FROM sec_users WHERE login = '”. $login ."’";
sc_lookup(rs,$sql);
if(count({rs}) != 0)
{
{status} = “Login Access already exists. Please change to other login name”;
sc_set_focus({login});
sc_error_exit();
}
else
{
{status} = “Login Access available”;
sc_set_focus({login});
}
My question is how to change the field {status} to blue if the login is available or red during unavailable? I tried the sc_field_color (“status”, “#CC0000”); but it doesn’t works. Kindly advise. Thank you.