yep i guess that, so NOW() is a mysql function.
- [ Paul Ferrie ] - wrote:
So Jason what your saying is this
$query = "INSERT INTO contacts (id, name, pass, email, dateAdded) VALUES
(NULL, '$name', '$pass', '$email', '$time')";
Should be
$query = "INSERT INTO contacts (id, name, pass, email, dateAdded) VALUES
(NULL, '$name', '$pass', '$email', NOW())";
??
cheers
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Tuesday 07 January 2003 00:19, - \[ Paul Ferrie \] - wrote:
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
What column type is dateAdded? If it's a mysql DATE type then you should
replace:
'$time'
with
NOW()
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
It's more than magnificent -- it's mediocre.
-- Sam Goldwyn
*/
--
When ipv6 and tcpa are there.. When this Palladium server wrecks..
I won't be able to drink my coffe then!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php