Hi Dean,
Here is my modified script:
<?php
// add-to-list.php
// include LM stuff
include('./config.php');
include('./admin.php');
// get LM email,fname,lname based on UID
$u = $_GET['u'];
$list = $_GET['l'];
if(!$u) exit('error: uid not provided');
if(!$list) exit('error: list number not provided');
list($em,$fn,$ln)=mysql_fetch_row(mysql_query("select email,fname,lname from lm_users where uid = '".addslashes($u)."';"));
if(!$em) exit('error: uid not found');
// get listmail path
list($lmp)=mysql_fetch_row(mysql_query("select listmailpath from lm_config"));
// forward the user with urlencoded vars to signup.php, so custom HTML, etc. is shown
header('Location: '.$lmp.'signup.php?email='.urlencode($em).'&fname='.urlencode($fn).'&lname='.urlencode($ln));
?>
Here are the errors I am getting:
Warning: Variable passed to each() is not an array or object in /home/httpd/vhosts/mailist.co.uk/httpdocs/mail/signup.php on line 27
Warning: reset(): Passed variable is not an array or object in /home/httpd/vhosts/mailist.co.uk/httpdocs/mail/signup.php on line 63
Warning: Variable passed to each() is not an array or object in /home/httpd/vhosts/mailist.co.uk/httpdocs/mail/signup.php on line 65
Warning: reset(): Passed variable is not an array or object in /home/httpd/vhosts/mailist.co.uk/httpdocs/mail/signup.php on line 132
Warning: Variable passed to each() is not an array or object in /home/httpd/vhosts/mailist.co.uk/httpdocs/mail/signup.php on line 134
ListMail Custom HTML not found! Please contact your administrator.
Should the new list number appear somewhere in the urlencoded vars to signup.php?
Cheers,
Paul