SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 37 of 37
  1. #26
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    >scratches head<

    Try this:
    PHP Code:
    while( $email mysql_fetch_array$kms_nletter ) )
    {
      
    $message2 'Hi '$email['name'] .',\n\n'$message .'\n\n To unsubscribe from our NewsLetter click the link please send an email to '$admin_email;
      echo 
    $message2;
      
    mail$email['email'], $email_subject$message2"From: $admin_email);
    }
      echo 
    ' <font color="blue" size="2" face="Arial, Helvetica, sans-serif">NewsLetter has been sent successfully to your Subscribed Users !</font><p><font size="2" face="Arial, Helvetica, sans-serif">You will be redirected to your <b>Subscribed Users Page</b> in 5 seconds</font>'
    John

  2. #27
    SitePoint Evangelist Deano's Avatar
    Join Date
    Mar 2003
    Location
    Derbyshire, UK
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    >strolls into the forums with a big cheesie grin<
    Hi again John !

    It works perfectly...
    PHP Code:
    {
      
    $message2 "Hi "$email['name'] .",\n\n"$message ."\n\n"."To Unsubscribe from ".$website_name." NewsLetter, Send an email to".$admin_email." asking them to remove you from the database !";

      
    mail$email['email'], $email_subject$message2"From: $admin_email);

    Im assuming the '2' seperated the ($messsage form input) and ($message2 display) where as we was just echoing ? the message resulting in duplication

    I think thats right, well worked out John

    I've been trying to add a link to the emails where they can click and there info be deleted from the database. The link apperas fine but will not display the $id of the users info, this is the link I've been throwing around

    PHP Code:
    http://www.path_to_script/delete.php?id=$id 


    My other alternative is to add a password field to the subscribe.php allowing the user to add a password allowing them to edit or delete their details.
    Am I the only one that starts a script with the basics and then before you know it wanting to add better features, or is this natural !

    Best Regards
    Deano !

  3. #28
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's quite natural!

    Would this be what you are looking for?
    PHP Code:

      
    $message2 "Hi "$email['name'] .",\n\n"$message ."\n\n"."To Unsubscribe from ".$website_name." NewsLetter, click on the this link, <a href="ht tp://www.yourSite.com/remove.php?id=".$email['theIdFieldNameHere']."</a>";
      
    mail$email['email'], $email_subject$message2"From: $admin_email); 

    Remove the space in the "http" in the code above.
    John

  4. #29
    SitePoint Evangelist Deano's Avatar
    Join Date
    Mar 2003
    Location
    Derbyshire, UK
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thx John I'll give it a try !

  5. #30
    SitePoint Evangelist Deano's Avatar
    Join Date
    Mar 2003
    Location
    Derbyshire, UK
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi again John it works perfectly just had I'd hoped it would, I had to alter a couple of things to get it to work right, here's the end result !
    PHP Code:
    $message2 "Hi "$email['name'] .",\n\n"$message ."\n\n"."To Unsubscribe from ".$website_name." NewsLetter, click on the link, http://www.ops-centre.co.uk/KMS/nletter/delete.php?id=".$email['ID']."";

      
    mail$email['email'], $email_subject$message2"From: $admin_email); 
    Just like to say a big thankyou to John for helping me out with this, I couldn't have done it all.

    John you want me to send you the full script seeing as you helped me out from start to finish ?

    Best Regards
    Deano !

    PS i voted for you on the vote for this person thingy !

  6. #31
    SitePoint Evangelist Deano's Avatar
    Join Date
    Mar 2003
    Location
    Derbyshire, UK
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm,

    Do you think there's any need to show a list of all suscribed users ? to the admin panel !

  7. #32
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Deano
    Hmmm,

    Do you think there's any need to show a list of all suscribed users ? to the admin panel !
    It depends on what you want to do with that information. It's all up to you!

    Don't worry about sending me the script. I have enough on my machine as it is!

    Glad it's all working!
    John

  8. #33
    SitePoint Evangelist Deano's Avatar
    Join Date
    Mar 2003
    Location
    Derbyshire, UK
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well i have a section where the admin can manualy delete a unwelcomed subscriber !

    But if there was to be a thousand subscribers this could be a problem as the page would be a mile long ! as i dont know how or have a next page | previous page.

    Although there is a solution to this, I suppose I could try and make a search option where the admin could do a search for a subscribed user !

    But then again who cares who has or not subscribed !

    hmm catch 22

  9. #34
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    then you get into selective searches and pagination! If you know the unwanted subscriber, you could manually delete them from the db, or create an app that would do it for you.
    John

  10. #35
    SitePoint Evangelist Deano's Avatar
    Join Date
    Mar 2003
    Location
    Derbyshire, UK
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    edited the above post

  11. #36
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Again, where you go with it, and what you think is important to include, is entirely up to you if the site is yours!
    John

  12. #37
    SitePoint Evangelist Deano's Avatar
    Join Date
    Mar 2003
    Location
    Derbyshire, UK
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol I think I'll leave it as it is, this script has sucked my brain dry


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •