RazorMaster
05-08-2008, 10:03 PM
Hi,
I'm trying to add a field "date" in mysql db.
To this field, will be added a date which becomes from a form by selecting a javascript calendar and inputing it to a textbox.
I've got 2 questions:
1- What format would i get in mysql for date format "D,F j,Y", i.e:
Wednesday, May 28, 2008
2- I have this code to get the value from the form and then other code to insert it into the DB.
$post_date = date("D,F j,Y", $info['post_date']);
But, for some reason, I can't add this value to the DB in mysql.
I've got this fieldset in mysql:
project_done - text(30) NOT NULL
and have this error after I select a day in calendar:
Warning: date() expects parameter 2 to be long, string given in /.../post.php on line 114.
In line 114 here's the code:
$post_date = date("D,F j,Y", $info['post_date']);
Can you help me setting up this date fields???
Thanks
I'm trying to add a field "date" in mysql db.
To this field, will be added a date which becomes from a form by selecting a javascript calendar and inputing it to a textbox.
I've got 2 questions:
1- What format would i get in mysql for date format "D,F j,Y", i.e:
Wednesday, May 28, 2008
2- I have this code to get the value from the form and then other code to insert it into the DB.
$post_date = date("D,F j,Y", $info['post_date']);
But, for some reason, I can't add this value to the DB in mysql.
I've got this fieldset in mysql:
project_done - text(30) NOT NULL
and have this error after I select a day in calendar:
Warning: date() expects parameter 2 to be long, string given in /.../post.php on line 114.
In line 114 here's the code:
$post_date = date("D,F j,Y", $info['post_date']);
Can you help me setting up this date fields???
Thanks