Jump to content

INSERT date in database


nickbunyun

Recommended Posts

ok so this is the part of coding i need help with

 

$sql="INSERT INTO formone (date, opinion)
VALUES
('$_POST[date]','$_POST[opinion]')"

 

I want to make it automatically add the date, so i dont have to type it in.

i understand that the php line for it is

 

 
<? echo date("Y-m-d"); ?>

 

how do i make it so it automatically adds it??

Link to comment
https://forums.phpfreaks.com/topic/102720-insert-date-in-database/
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.