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 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 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 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 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 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 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 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 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 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.