Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81803

Update fields with PHP session variables

$
0
0

Hello!

I want to create a system to track when a record is created and modified. I have created all of the fields needed and made them read only so they can't be changed, I just can't seem to figure out the rest.

I'm using a ON UPDATE CURRENT_TIMESTAMP attribute for lastmodified, however I still need some way to handle the other three options.

I need to pass $_SESSION["username"] to the field createdby and the current time to createdat when a new entry is submitted.

I also need to pass $_SESSION["username"] to the field modifiedby whenever a change is made to a field.

Any suggestions on how this can be done easily?


Viewing all articles
Browse latest Browse all 81803

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>