close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Login Date and Time Stamps

Thread began 12/23/2009 8:33 am by Walikan | Last modified 10/15/2011 11:04 am by biz295654 | 4590 views | 12 replies |

Walikan

Login Date and Time Stamps

Hello All,
I need help to include in my profile page the time stamp the user last visited (Logged in), for example (You last visited: Wednesday 23, 2009 at 07:54 AM )and I also want the time stamps be registered into the my database. That is each time a user login, the date and time is registered in the database. Any help will be appreciated.
Thanks in advance

Sign in to reply to this post

Ray BorduinWebAssist

Create a LastLogin table in your database with a date/time field, and then apply the DataAssist Insert server behavior on your login page. You would leave the success redirect blank in your login server behavior and use the redirect after insert to redirect to the profile page or whatever page you go to after login.

Insert the value: <?php echo(date("Y-m-d h:i:s")); ?> to get the current time inserted into that field and also insert the userID for the logged in user from the session.

You can then create a recordset from that table to show the last login by using: ORDER BY LoginDate DESC LIMIT 1

Sign in to reply to this post
Did this help? Tips are appreciated...

biz295654WebAssist

Similar situation. I have a "lastchanged" field in my db table. When updating via DataAssisst, after I inserted a hidden field


<input id="HiddenFields_fields" name="HiddenFields_fields" type="hidden" value="<?php echo date("Y-m-d h:m:s"); ?> " />

it works great.

In my Security Assist update page, I can't get it to work.

Missing some concept.

Thanks much.

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of your page so i can examine the code.

Sign in to reply to this post

biz295654WebAssist

original and 2 different tests. Thanks much. This is the same project that had a ticket on it yesterday, so if you need ftp access, it's noted in that ticket...

thanks

userupdateTEST2.php is a renamed DA updater page... I was hoping that would work, but I couldn't get the redirect to go to logout

Sign in to reply to this post

biz295654WebAssist

trying again on attachment

Attached Files
Archive.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the pages have the forms action hard coded:
<form action="../directory2/directory_Update.php?ID=<?php echo(rawurlencode($row_WADAdirectory['ID'])); ?>" method="post" name="WADAUpdateForm" id="WADAUpdateForm">


so if you rename the page, you will also need to modify the forms action so that it will go to that page. Right now, you have the userupdateTEST2.php posting the information to the directory_Update.php page.

Sign in to reply to this post

biz295654WebAssist

Thank you so much!

Sign in to reply to this post

biz295654WebAssist

I understand what you explained. However, that was a test to see if I could get a data assist page to replace the security assist page. I tried this because I was able to get the DA page to accept a time date change but was unsuccessful with my userupdate.php in Security Assist.

So I'm back to square one. What do I do, within the SA page, userupdate.php to update the database for time date stamp.

Thanks for the patience.

Sign in to reply to this post

Ray BorduinWebAssist

You can click on the the update database server behavior on the user update page and set the field value to the current timestamp using php:

<?php echo(date('Y-m-d h:n:s')); ?>

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...