473,322 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Coding a Daily Attendance Register in PHP

3
I just need the code for this plz help me
Jun 8 '07 #1
3 5589
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 Expert 1GB
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 Expert 4TB
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
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...
0
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....
1
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...
0
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...
1
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...
4
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) :...
18
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
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...
5
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...
1
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. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.