How to change format of date and insert it in database using php and html only -


i used tag in html accepting date

$date = date('d-m-y', strtotime($_post["date"])); 

i used code converting date. date converted if echo date not getting inserted in database. gets posted 00-00-0000 if click in database proper date appears.the type 'date' used in database store date.

please tell me how store in database in converted format.

you can't store in database in format in date field. database stores dates in y-m-d format (yyyy-mm-dd), when read date out again , display it, convert format want show as.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -