用PHP识别下周[关闭]

I have a form which user submits and I get the current time and date in the database and facebook ID of the user as well, As per rule the user can fill the form only once in a week, so if he fills the form on Tuesday, he is not eligible to fill the form unless the week is complete, (Only eligible to complete the form again on next Monday) I am trying to find some php function for weeks but couldn't get so, Anyone can help me what can be done for this logic? I have date/time in the db for me.

First, you are basically looking for

$date = "2014-10-13"; $week=date("W", strtotime($date));

or even use it this way

$date = "2014-10-13"; $date = new DateTime($date); $week = $date->format("W");

( http://php.net/manual/en/function.date.php )