Page 5 of 14 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 137

Thread: javascript? php? simple mailing list database?

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

    Default

    weird.

    I think the issue might be that your server has file functions disabled... :\

    i'm not sure what the easiest way to check that is.

    make a new page, and run this:
    <?php phpinfo(); ?>
    or
    <?php echo phpinfo(); ?>

    I can't remember if it by default displays with that command.

    that will tell us if it's disabled.

    That command itself might be disabled, as it might be seen as a security risk to the server. not sure.

    If so, then you can't do it this way.

    you could try a database... do you have one you can use?

    short of that... you can just use it sending you an email and adding it manually.

    Or... get a better host.


    Might still be the script.. i'm not sure. i'll test it on my server and see what happens tomorrow.
    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

  2. #42
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Also that alert just does not want to behave!

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

    Default

    Is the .txt file updated? I'm looking at that, and it still says $messages, not $message. If that's the newest version, just change that, and it'll be fixed.
    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

  4. #44
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33
    weird.

    I think the issue might be that your server has file functions disabled... :\

    i'm not sure what the easiest way to check that is.

    make a new page, and run this:
    <?php phpinfo(); ?>
    or
    <?php echo phpinfo(); ?>

    I can't remember if it by default displays with that command.

    that will tell us if it's disabled.

    That command itself might be disabled, as it might be seen as a security risk to the server. not sure.

    If so, then you can't do it this way.

    you could try a database... do you have one you can use?

    short of that... you can just use it sending you an email and adding it manually.

    Or... get a better host.


    Might still be the script.. i'm not sure. i'll test it on my server and see what happens tomorrow.
    ok well something happened! http://www.curiousclothing.com/test.php

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

    Default

    This is interesting, if the user just types in a word say "test", it resets the page and the alert happens... but nothing telling them there is an error: http://www.curiousclothing.com/index.txt

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

    Default

    Yeah. That means the email was invalid. Something's not set up to give them the error message. I'll figure it out tomorrow... tired now.

    Ok.... good. The test page will help see if the file stuff is enabled.

    Will check soon

    By the way, it says that safe mode is enabled... might deny you access to the files.
    I'm not sure though.
    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. #47
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I can't remember if it by default displays with that command.
    It does.
    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. #48
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33
    Yeah. That means the email was invalid. Something's not set up to give them the error message. I'll figure it out tomorrow... tired now.

    Ok.... good. The test page will help see if the file stuff is enabled.

    Will check soon

    By the way, it says that safe mode is enabled... might deny you access to the files.
    I'm not sure though.
    Thanks again! have found a nice little JavaScript for the validation...
    <form name="validation" onSubmit="return checkbae()">
    Please input a valid email address:<br>
    <input type="text" size=18 name="emailcheck">
    <input type="submit" value="Submit">
    </form>
    <script language="JavaScript1.2">

    var testresults
    function checkemail(){
    var str=document.validation.emailcheck.value
    var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
    if (filter.test(str))
    testresults=true
    else{
    alert("Please input a valid email address!")
    testresults=false
    }
    return (testresults)
    }
    </script>

    <script>
    function checkbae(){
    if (document.layers||document.getElementById||document.all)
    return checkemail()
    else
    return true
    }
    </script>

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

    Default

    I'm confused. The php I gave you will verify that correctly, I'm sure.
    It checks for the @ symbol and makes sure there is at least one period after the symbol.

    While that javascript may do it too, there is no point in having it.

    Using javascript for verifying something is pointless. The user can get around that if they want to, and some browsers aren't compatible with it.
    If you have the php anyway, how does that help?

    Or, perhaps you are using the javascript as a way to notify the user when they submit the form. I suppose this is worth it. The php will do the same, though, but after its submitted. Something was weird about the way I coded the alert if the email was wrong, but that can be fixed.

    Does the file still not show up?
    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

  10. #50
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33
    I'm confused. The php I gave you will verify that correctly, I'm sure.
    It checks for the @ symbol and makes sure there is at least one period after the symbol.

    While that javascript may do it too, there is no point in having it.

    Using javascript for verifying something is pointless. The user can get around that if they want to, and some browsers aren't compatible with it.
    If you have the php anyway, how does that help?

    Or, perhaps you are using the javascript as a way to notify the user when they submit the form. I suppose this is worth it. The php will do the same, though, but after its submitted. Something was weird about the way I coded the alert if the email was wrong, but that can be fixed.

    Does the file still not show up?
    Yea not sure what it does... can you see where the issue is with why it resets the page? but doesn't give the error? Yea Javascript I guess was just an extra bit for users who are a bit slow on the uptake

    I made the text file but nothing writes to it... Was it to do the PHP page we looked at? Is it worth setting it up for a database? I'm a pretty quick learner... Would I need to set mySql up on my system? It's set up on the server already...

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
  •