Groups | Blog | Home
all groups > dotnet general > november 2004 >

dotnet general : how to create Log-in form


Resti M. Guay
11/15/2004 10:54:01 PM
i have my database in my local server named SPMS which contains table named
"tbl_users", the table has the ff fields; "username", "password",
"employee_name".
In my Log-In form i have ff textbox "pass", and "uname". I need a code that
runs and check if password for the user name is on the record, and prompt a
msgbox showing the Employee Name.

resti
--
Peter Jausovec
11/16/2004 8:00:57 AM
Hi,

Try with sql: select employee_name from tbl_users where username = uname and
password = pass.

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
[quoted text, click to view]

Flip
11/16/2004 1:51:39 PM
[quoted text, click to view]
Once you get this working, I would suggest taking a look at using parameters
to ward off sql injection security hacks. That's the type of hack where
user enters in ' or 1=1 as the password and if you use the above pseudo code
a bit too literally, you'll be exposing your whole site.

Peter Jausovec
11/17/2004 11:29:52 AM
Hi Filip,

Sure, I am aware of this, it was just an example and of couse is meant to be
used with parameters.

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
[quoted text, click to view]

AddThis Social Bookmark Button