|
|
|
|
|||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
IPB post date check
Luca,
You said you have access to the board's DB, correct? Just from looking at the link you provided I can see that somewhere in the database it does store the date/time of each post. So, to meet your conditions your query should be something simple like this: // $username = $_PST['user_name']; $begin_date = "01/01/2001"; $end_date = "01/01/2008"; $register_before_date = "01/01/2008"; $query = "SELECT username, register_date, message_date FRM table_1, table_2 WHERE username = '$username' AND message_date BETWEEN '$begin_date' AND '$end_date 23:59:59.997' AND register_date <= '$register_before_date'" Then get your result setif it isn't empty, that user matches your criteria and can access the forum. if you don't want an array you could just do a SELECT **** and then assign the value to a variable and check something like: if ($count 0) { allow access } Hope that helps. Dan |
![]() |
| Viewing: Web Development Archives > Mailing Lists > PHP > IPB post date check |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|