Jump to content

Date and Time


Trium918

Recommended Posts

I am trying to create a script that will store the user registeration date in a database so that I can keep track of the user last visit to my website. If anyone can help me, I will be more than happy to accept any ideas of where to start first.



[code=php:0]$host="localhost";
$database="Date"; //The name of the database
$dusername="root";
//$dpassword="";
$x=mysql_connect($host,$database,$dusername/*,$dpassword*/);
$x1=mysql_select_db($database)
or die("Could not select Date database !");
/*$user_date is the name of the column in the database but
how do I insert the user register date into the variable $user_date
so that it can be stored inside $user_date which
will be stored in the database called Date?*/
$query="INSERT into Date Values('".$user_date."')";
$result=mysql_query($query);
if (!($result)) { die("User Register date could not be stored"); } [/code]
Link to comment
https://forums.phpfreaks.com/topic/30133-date-and-time/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.