Jump to content

Auto Invoice?


Guest hauntmisery

Recommended Posts

[code]<?php
if(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 found
while($userinvoice = mysql_num_rows($dueinvoice)){
//$message = Type Your Message Here
//$headers = Your HEaders Here
//$subject = Subject Here

mail($userinvoice['email'],$subject,$message,$headers);

}
?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/23624-auto-invoice/#findComment-107276
Share on other sites

u could make it a button
then 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 include
on 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
Link to comment
https://forums.phpfreaks.com/topic/23624-auto-invoice/#findComment-107995
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.