Date: 10/30/02
- Next message: Alex Francis: "[PHP-DB] Re: Inserting current date(MySQL)?"
- Previous message: Jeffrey_N_Dyke <email protected>: "Re: [PHP-DB] Inserting current date(MySQL)?"
- In reply to: David Jackson: "[PHP-DB] Inserting current date(MySQL)?"
- Next in thread: Alex Francis: "[PHP-DB] Re: Inserting current date(MySQL)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I'm my trying to insert to current date from a php form? I know that
> MySQL has a CURDATE() fucntion and PHP has several date function, but I
> cann't seem to get either to work? Here is my existing code:
> $ADDDATE=date("Y-m-d");
[snip]
> VALUES ('$_POST[ADDDATE]',
You've got two different variables there. You should just use $ADDDATE in
your query.
Or, like you said, just use CURDATE() or NOW() in your query.
VALUES (NOW(), ...
VALUES (CURDATE(), ...
---John Holmes...
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Alex Francis: "[PHP-DB] Re: Inserting current date(MySQL)?"
- Previous message: Jeffrey_N_Dyke <email protected>: "Re: [PHP-DB] Inserting current date(MySQL)?"
- In reply to: David Jackson: "[PHP-DB] Inserting current date(MySQL)?"
- Next in thread: Alex Francis: "[PHP-DB] Re: Inserting current date(MySQL)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

