Login Form

I have used the control app to create a login form. The login form is supposed to verify the authorized users and passwords before allowing access to the main application. However, I am unable to make it work to authenticate my Mssql Native Server. The onValidate event keeps prompting back the old message that I have coded in earlier. Even now that I have all the codes erased from the onValidate event, upon clicking the OK button, I still received the old error message, which prompted “OK”.

The code is somewhat like this:
$usr = {UserID};
$pwd = {Password};
$sql = “Select * from tblUser Where (userID = '”.$usr."’) AND (password = ‘".pwd."’)";

sc_lookup(ds, $sql);

if (isset({ds[0][0]}))
{
//echo “OK”;
sc_redir(CustomerList.php)
}
else
{
echo “Something is wrong”;
}

Help would be highly appreciated. I figured this has something to do with history cookies or something?

Thanks
George

If you are working in version 7 there’s a problem where changes are stored, but not used in (new) generations. .pwd. should be .$pwd. but I assume this is a typo. Don’t forget to prevent the code for sql injection. This code is not safe!

Thank you Albert for your prompt reply. I am very new to scriptcase. The missing $ is a typo, you are right.

So, what you mean is this is a problem with version 7? Any solution or workaround? How can I clear this variables after being used?

George

There’s a main issue with version 7 which currently doesn’t have a work-around. I expect that SC will address this asap.

Thanks Albert!

George

The issue is solved, you need to apply a setting in php.ini, see sticky message.

Hello,

This issue was already addressed, please see: http://forum.scriptcase.net/showthread.php?3522-Applications-does-not-change-when-generate-sourcecode-SOLVED

regards,
Bernhard Bernsmann