I’m working on a control to redirect to a form.
The control select ask for the name and password then would have to select the employe_id corresponding to these values.
So far, I could not get it to work:
[v_user] = {employee_id};
[usr] = {name};
$pwd = {password};
$sql = “SELECT employee_id, name, password
FROM
employee
WHERE
(name = '”.[usr]."’) AND
(password = ‘".$pwd."’) AND
(employee_id = ‘".[v_user]."’)";
sc_lookup(ds, $sql);
if (isset({ds[0][0]}))
{
sc_redir(form_1,v_user={employee_id},"_self");
}
else
{
echo “wrong username or password”;
}
Using sc_alert({no_employe}); it always returns a 0. Why?
I need the employee_id to pass it to the form but I want to avoid having the end user to enter it in the control…
Does anyone have an idea how to do it?