Hi Gunther,
Yes, I ran into that myself, the code is buggy, line 92 reads:
$cmd = "select id from lm_users where list = '$li''and email like '$em'";
Should be replaced with:
$cmd = "select id from $utable where list = '$list' and email like '$em'";
$utable is used all over in this code and then left undefined, at the top you need to define $utable like this:
$utable = 'lm_users';
I put it right after $sqldb =
There are other problems with the code, when setting up the defined vars - uncomment ALL of them, and define (set to 1) only one of them, like this:
$allow_dupes = 0;
$overwrite_dupes = 0;
$ignore_dupes = 1;
Just make sure you only set one of those to 1.
I don't like the way the calls are made to MySQL through the DBI interface either, there needs to be code for attempting the call several times, not just 'execute'... but that's just my opinion, also I couldn't get that last line of MySQL defined properly in a string, and had to use what was there, does anyone know how to define this to make it work:
$dbh->do('INSERT INTO lm_users VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',undef,('null',$uid,$list,"$fn","$ln","$em","$u1","$u2","$u3","$u4","$u5","$u6","$u7","$u8","$u9","$u10","$sq","$de",'1',$da,"$ip","$ref",'1','0'));
I'd like to use something like below but can't get it defined to work properly, any ideas?:
$cmd = "INSERT INTO lm_users VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" . ",undef,('null',$uid,$list,\"$fn\",\"$ln\",\"$em\",\"$u1\",\"$u2\",\"$u3\",\"$u4\",\"$u5\",\"$u6\",\"$u7\",\"$u8\",\"$u9\",\"$u10\",\"$sq\",\"$de\",'1',$da,\"$ip\",\"$ref\",'1','0'";
Dean, what'd you have for breakfast? Seems that code is buggy in a few places and wasn't tested properly (doesn't sound like you)!