Hello Dean,
I am trying to accomplish the following:
I want to have a script run daily by a crontab which:
1. retrieves data (orderID, email, fname, lname) of clients which have ordered 10 days ago from a database of my shopping cart hosted at X. These are typically from 3-20 sets of data.
2. stores this data in Listmail hosted at Y at the same time and sending them a welcome Email.
While it's certainly no problem to retrieve the data for 1, it's a problem for me to store this in Listmail using your script LMinsert.php.
I get the error message:
Fatal error: Cannot redeclare lminsert() (previously declared in /vitamobw/www.vitamine-und-mehr.org/virility/follow/LMinsert.php:44) in /vitamobw/www.vitamine-und-mehr.org/virility/follow/LMinsert.php on line 44
The reason for this is certainly that I have tried to accomplish the whole thing by setting a loop using
.
.
.
while(I retrieve the data from database X) {
(defining parameters)
include("LMinsert.php");
}
echo "done";
... and LMinsert.php opens a new database connection while the old one is still open.
You see I am not a savvy programmer. Can you give me a hint? Do I have somehow to close the first connection before letting LMinsert.php run?
Or is there an even more elegant solution?
Thanks
Wolfgang
P.S.: I changed the script supposed to do the job by using:
include_once('LMinsert.php');
This prevented the "cant redeclare"-error to appear. Nevertheless the data is not stored in my Listmail database!