Good evening, I ask for help because I’m trying to finish a project but are not very prepared, from the login screen depending on the type of user level must indirizzarrlo to a specific menu: if the level is 5 should be directed to the page menu if it is different from 5 must be addressed to A-Menu.
place the following code that I wrote.
I write the code in the event OnValidate
$usr = {User};
$pwd = {Password};
$sql = “SELECT
User,
psw,
livello,
Nominativo
FROM
dipendenti
WHERE
(User = '”.$usr."’) AND
(psw = ‘".$pwd."’)";
sc_lookup(ds,$sql);
if ({ds[0][2]}== 5 )
{
sc_redir"Menu";
}
ELSE
{
sc_redir"A-Menu";
}