Author Topic: preventing sign ups  (Read 3563 times)

sanj

  • Posts: 54
    • View Profile
preventing sign ups
« on: August 03, 2007, 06:05:14 am »
hi,
When someone has placed an order and is added to my back end list, I don't want them to be able to signup to my other lists. How do I do that?

Thanks
Sanj
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
preventing sign ups
« Reply #1 on: August 06, 2007, 01:46:43 am »
Hi SanJ,

The best way at this time is with an intermediary script, ie:
Code: [Select]
<?php// example signup2.php// place in ListMail folder and point all signup forms to itinclude('./config.php');include('./admin.php');// dont allow if on this list$back_list = 1;list($test)=@mysql_fetch_row(mysql_query("select id from lm_users where list = '$back_list' and email like '".addslashes($email)."';"));if($test){ echo "Sorry you may not subscribe...<br>"; exit;}// build vars $vars=array(); foreach($_POST as $k=>$v){ $vars[]=$k.'='.urlencode($v); } // forward to signup.phplist($lmp)=@mysql_fetch_row(mysql_query("select listmailpath from lm_config"));header('Location: '.$lmp.'signup.php?'.implode('&',$vars));?>

Please let me know if you need more help

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

sanj

  • Posts: 54
    • View Profile
preventing sign ups
« Reply #2 on: August 06, 2007, 06:08:47 am »
hi Dean,
Tried the code. Doesn't work. Check out this page
http://www.example.com/example.htm (removed by DW)

sanj
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
preventing sign ups
« Reply #3 on: August 06, 2007, 09:05:39 pm »
SanJ,

I had access to your server through some previous technical work.  I found and fixed the problem on both your site and in the first code example above.

This:
Code: [Select]
// build vars
$vars=array();
while(list($k,$v)=each($_POST)){
 $vars[]=$k.'='.urlencode($v);
}

Needed to be this:
Code: [Select]
// build vars
$vars=array();
foreach($_POST as $k=>$v){
 $vars[]=$k.'='.urlencode($v);
}

Regards :D
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

sanj

  • Posts: 54
    • View Profile
preventing sign ups
« Reply #4 on: August 07, 2007, 02:13:56 am »
hi
still getting some problems my end
this is what I get after subscribing with an existing or new email address
Code: [Select]
<removed>
Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/xxx/signup2.php:17) in /home/xxx/public_html/xxx/signup2.php on line 29

any ideas?
thanks
sanj
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
preventing sign ups
« Reply #5 on: August 07, 2007, 08:10:44 am »
Please try again - I thought I had removed that debug output but apparently I did not... I have done it now.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

sanj

  • Posts: 54
    • View Profile
preventing sign ups
« Reply #6 on: August 07, 2007, 08:33:27 am »
thanks Dean,
works like a charm!

sanj
 :lol:
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk