Page 10 of 14 FirstFirst ... 89101112 ... LastLast
Results 91 to 100 of 137

Thread: javascript? php? simple mailing list database?

  1. #91
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    thanks a million dj, looking at tomy's code helped a lot. thank you too, tomy.

    i guess the only problem now is the remaining commas when someone leaves. although i doubt it would be a problem for most mail clients, i'm sure they'd just skip over it.

    dj, you should maybe submit this script to dd? i'm sure it is something a lot of people will end up using, and you deserve your due credit. good luck with graduation man, and thanks again.

  2. #92
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Yeah, I'll submit when I'm done with it.
    The remaining commas aren't that hard to get rid of.... just haven't thought of a great way to do it yet.

    Any other bugs before it's done?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #93
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I agree dj you have to submit this it's a work of art!

    Ok have been playing around with it and found some things...

    If the user is stupid and types a whole heap of spaces in then the email it still gets submitted, but adds the spaces http://www.curiousclothing.com/emails.txt, I am still trying to get other thing to work... If they put just antyhing below 4 spaces and submit they don't get any error... If they put over that they do get the error... I realise no one will probably do this but I guess it's better to have it perfect...

    Also eventually when the error does come up and it tells them to please add a vaild email, the alert box still pops up...

    I've updated it all in the txt file...

  4. #94
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ok. I'll try to figure that stuff out.
    The alert is possible to control; don't worry.

    As for the spaces thing... I think I did it in the wrong order. It should allow
    ANY input, not just input over 4, then mark anything under 4 characters as an invalid email. That's easy to fix.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #95
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    still wasn't sure which mail tag to change also... thats from 2 pages back...

  6. #96
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Change the current line with mail(.....); to:
    Code:
        if ($email != "") mail("tom@curiousclothing.com", "Newsletter Nofication", "This message has been automatically generated to inform you that $email has chosen to $choice the newsletter.", "From: $email\r\nReply-To: $email\r\nX-Mailer: PHP/".phpversion());
    This isn't a perfect solution, though, as it will fail if the user entered spaces, like you were doing before. Use that for now.

    I'll fix it when I fix the rest.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #97
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    trim()
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #98
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33
    Change the current line with mail(.....); to:
    Code:
        if ($email != "") mail("tom@curiousclothing.com", "Newsletter Nofication", "This message has been automatically generated to inform you that $email has chosen to $choice the newsletter.", "From: $email\r\nReply-To: $email\r\nX-Mailer: PHP/".phpversion());
    This isn't a perfect solution, though, as it will fail if the user entered spaces, like you were doing before. Use that for now.

    I'll fix it when I fix the rest.
    Thanks dj ok have added the new code...

  9. #99
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Also is it complicated to do what this page does with there subscribe text box... http://www.vantageous.com/index.html, see how it has "your@email.com" then when you click it dissappears and re-appears if you click out of it?

  10. #100
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    That's javascript, I think.

    <input type="text" value="your@email.com" onFocus="this.value='';" onBlur="this.value='your@email.com';">


    Hehe, that works. Wow. And I don't even know JS.... just guessed. That was fun
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •