• 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: 3585
16
Android Java
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic