Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
norli — — source: Informix-list mailing list archive (1991-1998)
I have the following entry in my Informix OWS 7.22:
emp=0
name=abc
priv=1
I have the following in my JavaScript codes:
(At a login screen, enter employee ID (emp). The following codes will
verify the privilege)
cursor=database.cursor("select * from STAFF where emp='" + request.emp +
"'")
cursor.next()
if (cursor.emp==request.emp) // checks if emp exists
{
var empID = request.emp
if (cursor.priv=="1") // checks for privilege
{
redirect("admin.htm")
}
}
Problem:
If I enter 0 at the login screen and submit, it'll bring me the
admin.htm page.
If I enter 000 at the login screen and submit, it'll also bring me the
admin.htm page.
From dbaccess, if I query
SELECT * FROM staff WHERE emp='000'
The info for emp=0 is displayed. Strange...? HELP!!!!
Thanks in advance.
:-( norli
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.