Instead of the php function, 'time()'.  Try 'date()'.  Somethine like this

--clip--
<?
//Long way around
date("Y")."-".date("m")."-".date("d");

//Shortcut
date("Y-m-d");
?>
--clip--

You can customize the way you want the time format to be displayed.  You can
find it at http://www.php.net/manual/en/function.date.php and you'll see the
option for dates and times.

"- -" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hey guys could someone help me
> I have created a user login register system in  flash with PHP and Mysql.
> Everthing Now works fine aprt from the time stamp of when the user
> registered.
>
> Code -----------------------------------
> // Get current date & time
> $time = time();
> // Connects to the Database.
> $Connect = mysql_connect($dbServer, $dbUser, $dbPass);
> mysql_select_db("$dbName");
> // Preforms the SQL query to see if user name already exsists
> $query = "SELECT name FROM contacts WHERE name='$name'";
> $rs_contacts = mysql_query($query) or die(mysql_error());
> $row = mysql_fetch_assoc($rs_contacts);
> if ($row[name] == $name) {
> print "loginT=UserName in Use&checklog=2";
> }else{
> $query = "INSERT INTO contacts (id, name, pass, email, dateAdded) VALUES
> (NULL, '$name', '$pass', '$email', '$time')";
> }
>
>
> It inserts 0000-00-00
> instead of the current date
>
> ideas
>
> P.S
> I am a newbie try keeping reponse's simple please
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to