Hello everybody,
I'm working on a newsletter system in PHP4 & MySQL.
People can subscribe for the list, and can choose their areas of interest. There's a minimum of 1 and a maximum of 5 interests.
I allready have the main mailingsystem working, but I want it a little more complex.
I've seperated the mailform into 6 sections, the first one for general news that everybody gets, the second one for interest 1, the third one for interest 2, etc.
Now I want my recipients just to receive the information for the interests they've signed up for. So somebody who signed up for interest 2 and 5 should recieve the general part, and the parts for 2 and 5.
This is the bit of code I allready have, but I think I'm completely out of direction...
$query_tekst = "SELECT personen.persoon_id, interesse_persoon.interesse_id FROM interesse_persoon, personen WHERE interesse_persoon.persoon_id = '$id'";
$txt_tekst = mysql_fetch_assoc(mysql_query($query_tekst));
$interesse = $txt_tekst["interesse_id"];
IF ($interesse == "1")
$message = $message1;
IF ($interesse == "2")
$message = $message2;
IF ($interesse == "3")
$message = "$message1<p>$message2";
Is there someone who built a system like this before? And otherwise, is there someone who can give me some advise on how to make it work?
Many thanks!
Michael
I'm working on a newsletter system in PHP4 & MySQL.
People can subscribe for the list, and can choose their areas of interest. There's a minimum of 1 and a maximum of 5 interests.
I allready have the main mailingsystem working, but I want it a little more complex.
I've seperated the mailform into 6 sections, the first one for general news that everybody gets, the second one for interest 1, the third one for interest 2, etc.
Now I want my recipients just to receive the information for the interests they've signed up for. So somebody who signed up for interest 2 and 5 should recieve the general part, and the parts for 2 and 5.
This is the bit of code I allready have, but I think I'm completely out of direction...
$query_tekst = "SELECT personen.persoon_id, interesse_persoon.interesse_id FROM interesse_persoon, personen WHERE interesse_persoon.persoon_id = '$id'";
$txt_tekst = mysql_fetch_assoc(mysql_query($query_tekst));
$interesse = $txt_tekst["interesse_id"];
IF ($interesse == "1")
$message = $message1;
IF ($interesse == "2")
$message = $message2;
IF ($interesse == "3")
$message = "$message1<p>$message2";
Is there someone who built a system like this before? And otherwise, is there someone who can give me some advise on how to make it work?
Many thanks!
Michael