Login Availability and Validation

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 ."’";


if(count({rs}) != 0)
{status} = “Login Access already exists. Please change to other login name”;
{status} = “Login Access available”;

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.

The macro’s for changing colours only apply on grids. In the helpfile there’s a grid per macro showing in which event these are supported. The only way to change colour is by injecting javagrid. I collected some hints from this forum from Kevin, JSB and others in a faq which you can find here: http://scriptcase.aducom.com/cms/e107_plugins/faq/faq.php?0.cat.6.7

Hi Albert,

Thank you so much for your replied. Really appreciate it.