• Post Reply Bookmark Topic Watch Topic
  • New Topic

retrieve users session ID

 
nick diaz
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am building a payroll applet for a client. I have the admin gui set up so they can see everyone's info in a jtable. then i have a separate login for a employees. I need to allow employees to login which verifies their lvl admin or employee and then makes visible the correct gui..

onclick on the clock in button i need to retrieve the sessions users unique ID and then enter it in the new table and a time stamp in to a new table. the new table consist of 4 fields empid / in/ out / comment.

obviously i will have to repeat this process for clockin out then come up with a way tp make sure people can not clock in twice with out clocking out and set parameters showing there pay after 40 hours or time and a half.

1.how do i connect to mysql to get the current user who is logged in unique id which is called empid on the table.

2. how to I then insert it while also making the time stamp execute on click???

thank in advance
 
K. Tsang
Bartender
Posts: 3610
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Nick

I suggest you take a look at the JDBC tutorial to get yourself familiarize with how to connect and access data.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!