Jump to content

Time limits/delays ?


Tandem

Recommended Posts

Insert the date in the database with the users id ect ect then do a date diffrence of 1 day ok.


example only

//database date

$database_date="17/06/06";

$d=date("d")+1;

$date_know=date("$d-m-y");

//select statement

// while loop

if($what_ever['database_date']==1) {

echo "sorry you have submitted already";

}else if ($date_know - $what_ever['database_date']){

submit code

}


Example only ok for an idear.
Link to comment
https://forums.phpfreaks.com/topic/14856-time-limitsdelays/#findComment-59446
Share on other sites

example only 1 hour change

//database date

$database_time="10:00:00";

$h=date("h")+1;

$date_know=date("$h:i:s");

//select statement

// while loop

if($what_ever['database_date']==1) {

echo "sorry you have submitted already";

}else if ($date_know - $what_ever['database_date']){

submit code

}



example only 30 min change

//database date

$database_time="10:00:00";

$m=date("m")+30;

$date_know=date("$m:i:s");

//select statement

// while loop

if($what_ever['database_date']==1) {

echo "sorry you have submitted already";

}else if ($date_know - $what_ever['database_date']){

submit code

}


look up date() function or time() function.

link
http://uk.php.net/date
Link to comment
https://forums.phpfreaks.com/topic/14856-time-limitsdelays/#findComment-59476
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.