Guest hauntmisery Posted October 11, 2006 Share Posted October 11, 2006 how can i make a auto invoicer like when October 6 = Novmber 6 remind invoice and php sends out a email with out me having to run it or use cron. Quote Link to comment Share on other sites More sharing options...
chriscloyd Posted October 11, 2006 Share Posted October 11, 2006 [code]<?phpif(date('F') == "Janurary"){$month = "February";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "February"){$month = "March";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "March"){$month = "April";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "April"){$month = "May";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "May"){$month = "June";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "June"){$month = "July";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "July"){$month = "August";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "Auguse"){$month = "September";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "September"){$month = "October";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "October"){$month = "November";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "November"){$month = "December";$day = date('j');$duedate = $month.', '.$day;}if(date('F') == "December"){$month = "Janurary";$day = date('j');$duedate = $month.', '.$day;}$dueinvoice = mysql_query("SELECT * FROM tablename WHERE duedate = '$duedate'");// then do the mail function for each row foundwhile($userinvoice = mysql_num_rows($dueinvoice)){//$message = Type Your Message Here//$headers = Your HEaders Here//$subject = Subject Heremail($userinvoice['email'],$subject,$message,$headers);}?>[/code] Quote Link to comment Share on other sites More sharing options...
Guest hauntmisery Posted October 11, 2006 Share Posted October 11, 2006 and i dont even have to view the page for it to send out the invoice reminder? Quote Link to comment Share on other sites More sharing options...
chriscloyd Posted October 12, 2006 Share Posted October 12, 2006 u could make it a buttonthen at the bottom of the script right before the ?> put this in header("Location: pagehere");that will make it send an invoice to all users but u can just make it and includeon ur main admin page so eveyrtime u go on the admin page it will send but it will not send by its self unless u use cron job 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.