How to read date from the form and calculate a timestamp

Posted by Vafello on Stack Overflow See other posts from Stack Overflow or by Vafello
Published on 2010-04-21T12:59:56Z Indexed on 2010/04/21 13:03 UTC
Read the original article Hit count: 286

Filed under:
|

I would like to calculate a timestamp based on the input date. I would like to calculate it from the user input (something like 12/12/2011) I guess I need a function that changes the format to something readable for php and then calculate timestamp for this date. Maybe I should use strtotime() function? Any ideas will be appreciated.

  $date = $_POST['date'];

 <input type="text" name="date" value="">

© Stack Overflow or respective owner

Related posts about php

Related posts about timestamp