473,769 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Coding a Daily Attendance Register in PHP

3 New Member
I just need the code for this plz help me
Jun 8 '07 #1
3 5611
jaxpylon
4 New Member
I assume you already have some users table in the database?

What you need to do is create a new table in your database - let's say DailyRoster.

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE DailyRoster {
  2.     id_user int(11) NOT NULL, -- Should be the same as the key in your users table
  3.     date datetime NOT NULL,
  4.     PRIMARY KEY (id_user, date)
  5. };
Then, just put this on your page. This will check if a user's id session variable is set (replace the name to that of your session variable), and replace the current date into the table. $connect should be your database connection.

Expand|Select|Wrap|Line Numbers
  1. if (isset($_SESSION['id_user'])) {
  2.     $user_id = $_SESSION['id_user'];
  3.     $query_updateRoster = "REPLACE INTO DailyRoster VALUES ('$user_id', date('Y-m-d', getdate()));
  4.     mysql_query($query_updateRoster, $connect);
  5. }
Jun 8 '07 #2
ak1dnar
1,584 Recognized Expert Top Contributor
I just need the code for this plz help me

Posting Homework or Coursework Questions and Answers

This site is not a place where you can get your homework and course work done for you. Ignoring the questionable morals of getting someone else to do your work towards a formal qualification you will learn a lot more by attempting the problem yourself, then asking for help with the bits that are not working. You will be more likely to get help if you appear to have made an attempt at the problem yourself.
Jun 8 '07 #3
pbmods
5,821 Recognized Expert Expert
Changed thread title to better describe the problem.

If you want someone to do your coding for you, I'd be happy to refer you to my employer. TSDN members are expected to write their own code.
Jun 8 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
30722
by: SKBodner | last post by:
Hello, I'm stumped and I'm hoping someone could help me figure out the best way to track daily attendance for the next 6-4 months. I have a list of 80 or so participants who should be attended training on a daily basis and am tracking if they attended, have an unexcused absence, or are absence with an excuse. At the end of the month, I plan to print out reports on those who have missed more than one day with an unexcused absence. My...
0
1254
by: shun | last post by:
Hello I strated a project "attendance register". consiists of user login and logintime and logout time using ASP.net. can any one help me, or any sites which have free source code about this. Thanks in advance. regards Shun
1
2569
by: Shun | last post by:
Hello, My requirement is to develop an Employee Attendance Register. For ex: I am in some X country and my office is in Y country. now my requirement is i want to check the employees present and also there previous days attendance(i.e complete Month employee Attendance). I am farwarding in 2 ways, 1. By searching in Google for any free attendance register software.
0
2268
by: spattarkine | last post by:
How to create daily attendance system for students which create warning after each 3 absents.idea is as soon as the class and section are selected,names and roll no of all the students of that class will appear and by clicing the checkbox a student is marked present.At the end of the month the ateendance report should appear like a snapshot of attendance register.
1
3734
by: Paul H | last post by:
Can anyone give me some pointers as to how to construct a form or forms that will allow me to see a schedule of meeting rooms Booked or Available as a nice visual display. The Query that holds the data for the schedule will have the following fields: RoomName, StartDate, EndDate, BookedBy. It needs to look a bit like the Outlook calendar (not all users have Outlook), I do not need to see the times that rooms are booked/available, I just...
4
2375
by: Digitallad | last post by:
Hi I am a self thought in access and been creating a couple of data bases for my farm.I am now building a attendance register and is keeping it as simple as possible.Table is as follow: id(auto) : Date (=now()) : Employee 1 : Employee 2 : Employee 3 ................ What I need is to insert the value 1 into the field when a command button is clicked.The plan is to make a command button with the employee's picture on it that needs to be...
18
3555
by: yashumrhsn | last post by:
can anyone help me to get userid and password from access database..then it compares the userid and password and opens a new from that shows the details from the database for that user..
3
1753
by: Ed Robichaud | last post by:
I'm struggling to come up with a query/report of daily attendance for records that have only start and stop dates. A x-tab (with parameters that records be within a selected date range) would seem to be the way to go here, but how do I get a count for each date within that range? thanks -Ed
5
8912
by: Lindie | last post by:
We use a spreadsheet to record attendance for pupils with special needs. They live-in so we need 365/365 attendance details. The spreadsheet is getting too cumbersome, a Db is needed. I would like to turn the spreadsheet into a database. In the spreadsheet we have every day listed and then simply enter an attendance code. for the Db I have 3 tables StudentDetails Attendance TeacherDetails I use a StudentID as the primary key...
1
3629
by: aajayaprakash | last post by:
Am so glad someone atleast wroteback ! I am trying to set up an attendance register where time someone comes into an office and leaves is recorded...a php based timecard/punchcard kind of thing. Ive got to get the mysql table to record the time in and time out and the ip address from which the person logged in or logged out each day. That is where the parse error is cropping up in file2 that i posted below. if...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.