Jump to content

How to insert Date into mysql


jimcarry05

Recommended Posts

Hello, When I run this code. It stored 0000-00-00 on my database.

Here is PHP CODE

$date = $_GET["date"];
$query = "INSERT INTO tablename (col_name, col_date) VALUES ('Manual Date', '$date')";

And here is HTML

Date:
<input name="date" type="text">

Please correct this code. Thanks

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.