Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Newsletter Signup Creation

  • 08-07-2010 10:32am
    #1
    Registered Users, Registered Users 2 Posts: 782 ✭✭✭


    Hi all,
    I am working on a website and trying to create some sort of opt-in newsletter sign up. Has anyone any links to a good tool or code to do this please?
    Hosted server is running on windows so no PHP i guess...
    Thanks in advance,
    Gibo
    Tagged:


Comments

  • Registered Users, Registered Users 2 Posts: 2,472 ✭✭✭Sposs


    PHP works with Windows , a simple database script to just record whoever opted in will do the job, you can then just pull the contact details from the database when you go to send the newsletter through something like mailchimp.


  • Registered Users, Registered Users 2 Posts: 8,070 ✭✭✭Placebo


    i just store them in csv if there is no database associated with the website etc make sure file is created and set to writeable

    [PHP]<form method="POST" action="<?php echo $PHP_SELF;?>">
    <INPUT type="text" name="firstname" value="Name" style="border: 1px solid #498bae; color:#498bae; width:130px;"><br><br style='font-size:8px;'>

    <INPUT type="text" name="email" value="Email" style="border: 1px solid #498bae; color:#498bae; width:130px;"><br><br style='font-size:20px;'>
    <?php
    $a = $_POST;
    $b = $_POST;

    if( isset($_POST[firstname]) && ($_POST[email]) )
    {



    if( ($a == "Name") && ($b == "Email"))
    {

    }

    else{
    $file_handle = fopen("newsletter.csv", "r");


    $date = date("d-m-Y");

    $name = $_REQUEST["firstname"];
    $email= $_REQUEST["email"];

    $cr = "\n";
    $data = $name.','.$email.','.$date.$cr;


    $fp = fopen("newsletter.csv","a"); // $fp is now the file pointer to file $filename
    if($fp){
    fwrite($fp,$data); // Write information to the file
    fclose($fp); // Close the file

    } else {

    }



    fclose($file_handle);

    echo "Thank you for your subscription";




    }


    }

    else{}
    ?>[/PHP][/email]


  • Registered Users, Registered Users 2 Posts: 782 ✭✭✭gibo_ie


    Placebo wrote: »
    i just store them in csv if there is no database associated with the website etc make sure file is created and set to writeable

    [PHP]<form method="POST" action="<?php echo $PHP_SELF;?>">
    <INPUT type="text" name="firstname" value="Name" style="border: 1px solid #498bae; color:#498bae; width:130px;"><br><br style='font-size:8px;'>

    <INPUT type="text" name="email" value="Email" style="border: 1px solid #498bae; color:#498bae; width:130px;"><br><br style='font-size:20px;'>
    <?php
    $a = $_POST;
    $b = $_POST;

    if( isset($_POST[firstname]) && ($_POST[email]) )
    {



    if( ($a == "Name") && ($b == "Email"))
    {

    }

    else{
    $file_handle = fopen("newsletter.csv", "r");


    $date = date("d-m-Y");

    $name = $_REQUEST["firstname"];
    $email= $_REQUEST["email"];

    $cr = "\n";
    $data = $name.','.$email.','.$date.$cr;


    $fp = fopen("newsletter.csv","a"); // $fp is now the file pointer to file $filename
    if($fp){
    fwrite($fp,$data); // Write information to the file
    fclose($fp); // Close the file

    } else {

    }



    fclose($file_handle);

    echo "Thank you for your subscription";




    }


    }

    else{}
    ?>[/PHP][/email]
    Great stuff Placebo, many thanks for this.
    I also found this along the way which manages sub 200 subscriptions and seems a good tool so far, easy install!!
    http://www.hotscripts.com/listing/listmessenger-light/


  • Registered Users, Registered Users 2 Posts: 16 declanon


    Try MailChimp - http://www.mailchimp.com/ - it's a fantastic tool - free up to 500 subscribers and you can send up to 3,000 emails per month.

    If you require higher usage there are paid plans http://www.mailchimp.com/pricing/view-all


Advertisement