Something is up and I cant figure out what.
I created a control with two fields, Login and Password
On the On Validate event I have this.
$slogin = sc_sql_injection({Login});
$spswd = sc_sql_injection(({Password}));
$sql = "SELECT
sec_lvl,
CONCAT(first_name,’ ',last_name),
email,
schoolid,
userid
FROM users
WHERE login = $slogin
AND password = ".$spswd;
sc_lookup(rs, $sql);
if(count({rs}) == 0)
{
sc_log_add(‘login Fail’, {lang_login_fail} . {login});
sc_error_message({lang_error_login});
}
else if(count({rs}) >=1)
{
[groupid] = {rs[0][0]};
[usr_name] = {rs[0][1]};
[usr_email] = {rs[0][2]};
[schoolid] = {rs[0][3]};
[userid] = {rs[0][4]};
}
echo"name=" . [usr_name];
exit;
But it wont echo. I cant get any of these variables to echo out.
Under Global Variables, the [usr_name] variable is set to Session and Type=Out.
It’s something embarrassingly obvious I know it… any ideas?