hmdnawaz Posted March 14, 2011 Share Posted March 14, 2011 I want to recieve emails on weekly manner from thursday to thursday. For this how can i set the variables to pass to the sql query. I worte this $start_date = mktime(0, 0, 1, date("m"), date("j")-7, date("Y")); but it will calculate date from today. And I want to recieve emails on every friday morning. So please write the code for me also write the end date. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/230590-how-to-get-weekly-time-eg-from-thursday-to-thursday/ Share on other sites More sharing options...
HuggieBear Posted March 14, 2011 Share Posted March 14, 2011 How is this script going to be invoked? Via the browser, or via a cron job? Quote Link to comment https://forums.phpfreaks.com/topic/230590-how-to-get-weekly-time-eg-from-thursday-to-thursday/#findComment-1187321 Share on other sites More sharing options...
hmdnawaz Posted March 14, 2011 Author Share Posted March 14, 2011 Via the browser. Quote Link to comment https://forums.phpfreaks.com/topic/230590-how-to-get-weekly-time-eg-from-thursday-to-thursday/#findComment-1187322 Share on other sites More sharing options...
HuggieBear Posted March 14, 2011 Share Posted March 14, 2011 So are you going to invoke the script every Friday morning or something? Quote Link to comment https://forums.phpfreaks.com/topic/230590-how-to-get-weekly-time-eg-from-thursday-to-thursday/#findComment-1187325 Share on other sites More sharing options...
hmdnawaz Posted March 14, 2011 Author Share Posted March 14, 2011 yes every friday morning. I wrote this if(date('D') == 'Fri') Is this correct? Quote Link to comment https://forums.phpfreaks.com/topic/230590-how-to-get-weekly-time-eg-from-thursday-to-thursday/#findComment-1187336 Share on other sites More sharing options...
HuggieBear Posted March 14, 2011 Share Posted March 14, 2011 You realise that this will only send you an email when you run the page in the browser right? Quote Link to comment https://forums.phpfreaks.com/topic/230590-how-to-get-weekly-time-eg-from-thursday-to-thursday/#findComment-1187343 Share on other sites More sharing options...
hmdnawaz Posted March 14, 2011 Author Share Posted March 14, 2011 yes in the browser. Quote Link to comment https://forums.phpfreaks.com/topic/230590-how-to-get-weekly-time-eg-from-thursday-to-thursday/#findComment-1187345 Share on other sites More sharing options...
HuggieBear Posted March 14, 2011 Share Posted March 14, 2011 OK, so is it safe to assume that if Friday is the 13th of the month and you run the script you want events from the database between Thursday 12th and Thursday 19th? Quote Link to comment https://forums.phpfreaks.com/topic/230590-how-to-get-weekly-time-eg-from-thursday-to-thursday/#findComment-1187347 Share on other sites More sharing options...
Pikachu2000 Posted March 14, 2011 Share Posted March 14, 2011 What do you mean "so please write the code for me . . . "? We aren't here in gleeful anticipation just waiting to write code for you, you know. Quote Link to comment https://forums.phpfreaks.com/topic/230590-how-to-get-weekly-time-eg-from-thursday-to-thursday/#findComment-1187394 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.