I just need the code for this plz help me
Coding a Daily Attendance Register in PHP
Collapse
X
-
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.
Code:CREATE TABLE DailyRoster { id_user int(11) NOT NULL, -- Should be the same as the key in your users table date datetime NOT NULL, PRIMARY KEY (id_user, date) };
Code:if (isset($_SESSION['id_user'])) { $user_id = $_SESSION['id_user']; $query_updateRoster = "REPLACE INTO DailyRoster VALUES ('$user_id', date('Y-m-d', getdate())); mysql_query($query_updateRoster, $connect); }
-
Originally posted by pardhuI 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.Comment
Comment