Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
Last Login [PHP & MYSQL]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="BIOS" data-source="post: 331768" data-attributes="member: 15674"><p>Well I basically told you how to do it but here is a very basic method of the script, don't forget you would have to escape the query and such and also link the POST's etc.</p><p></p><p>[PHP]</p><p>$last = time(); // this is the current time as a timestamp</p><p></p><p>INSERT INTO users (id, username, password, last)</p><p>VALUES ('','$username','$password','$last');</p><p>[/PHP]</p><p>then output it like so:</p><p>[PHP]</p><p>$time = SELECT last FROM users WHERE username = '$username';</p><p>date("H:i:s", $time) // this converts the timestamp to a readable date/time</p><p>[/PHP]</p><p>read <a href="http://php.net/manual/en/function.date.php" target="_blank">this </a>for more formatting options of the date/time.</p></blockquote><p></p>
[QUOTE="BIOS, post: 331768, member: 15674"] Well I basically told you how to do it but here is a very basic method of the script, don't forget you would have to escape the query and such and also link the POST's etc. [PHP] $last = time(); // this is the current time as a timestamp INSERT INTO users (id, username, password, last) VALUES ('','$username','$password','$last'); [/PHP] then output it like so: [PHP] $time = SELECT last FROM users WHERE username = '$username'; date("H:i:s", $time) // this converts the timestamp to a readable date/time [/PHP] read [URL='http://php.net/manual/en/function.date.php']this [/URL]for more formatting options of the date/time. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
Last Login [PHP & MYSQL]
Top