Monday, 15 July 2013

mysql - Sending date to database with php -


Hi guys, I was wondering if you can help me if folliwng:

My Close calendar contains dates in hidden areas like this:

  & lt; Input name = "selDay_start1" type = "hidden" id = "selDay_start1" /> & Lt; Input name = "selMonth_start1" type = "hidden" id = "selMonth_start1" /> & Lt; Input name = "selYear_start1" type = "hidden" id = "selYear_start1" /> & Lt; Input name = "selDay_end1" type = "hidden" id = "selDay_end1" /> & Lt; Input name = "selMonth_end1" type = "hidden" id = "selMonth_end1" /> & Lt; Input name = "selYear_end1" type = "hidden" id = "sel Year_end1" />  

I need to get notifications for the first 3 (start date) and add them to the date of inserting them into a MSLL table. The only thing for the next 3 (expiration date) does anyone know how to combine these dates in the form of Yyyy / mm / dd?

If you need to combine it then it should work

 < Code> $ date = $ _REQUEST ["selYear_start1"] / "$ _REQUEST [" selMonth_start1 "]" / "$ _REQUEST [" selDay_start1 "];  

Use the function if you need to create a timestamp from the string

  $ date = strtotime ($ _ request ["selYear_start1"]. " / "$ _REQUEST [" selMonth_start1 "]." / ". $ _REQUEST [" selDay_start1 "]);  

No comments:

Post a Comment