We have to use particular format for date & time data before storing to MySQL date field. So if a user entered data is to be stored in a table then we have to change the format by using different string functions and convert them to acceptable date format. You can read this tutorial to know how the string functions are used to format the user entered data to MySQL table.
Video Tutorial on Inserting Date to Query
By using the function str_to_date() we can convert the string data to MySQL required format of date field. This function requires the string data and the format in which it is available.
i have two radio button. one button for show login datetime and another button for logout datetime to show. when i click login button it should store login datetime then after that if i click logout button it should store logout time. i want to store login & logout datetime in mysql using php. please help me .