Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: noob...

  1. #1
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    27
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default noob...

    noob or nerd, whatever you like... i just don't get along with php very much...

    So, i'm making this e-mail form here, with a flash base, and a php background. Intheory should work, but it's not working... i already spent eterneties trying to figure out what's wrong, but i just can't say what it is...

    Can somebody help me???

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

    Default

    it's not working...
    Well, that's helpful. How does the behaviour differ from what's expected of it? Do you get any error messages?
    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!

  3. #3
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    27
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    no, i don't recieve nothing at all... that's the problem, i should recieve a e-mail with the data from the fla file... but i have allmost 100% sure that there is no error on the fla file, although i may be wrong...

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

    Default

    The SMTP protocol uses CRLF (\r\n) to seperate headers.
    Code:
            $header = "From: " . $_POST['sender_nome'] . " <" . $_POST['sender_mail'] . ">\r\n";
            $header .= "Reply-To: " . $_POST['sender_nome'] . " <" . $_POST['sender_mail'] . ">\r\n";
            $header .= "X-Mailer: PHP/" . phpversion() . "\r\n";
            $header .= "X-Priority: 1\r\n";
    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!

  5. #5
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    27
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Are you sure that it was the only mistake i made on the php code?... it's still not working...

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

    Default

    Set error reporting to strict:
    Code:
    <?php
    error_reporting(E_STRICT);
    and add error checking on the mail() function. It returns false if the mail could not be sent.
    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!

  7. #7
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    27
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Unhappy

    It just don't send any error... now, this is odd... =s maybe it's because it's linked with flash... or i'm doing it all wrong...

    A friend of mine said to separate

    PHP Code:
    mail("inesmarques@oninetspeed.pt,jonybigude@gmail.com,cscimoes@cne-escutismo.pt""Inscricao 4 Ciclo - 2 Encontro"$body$header); 
    from the

    PHP Code:
    $header "From: " $_POST['sender_nome'] . " <" $_POST['sender_mail'] . ">\r\n";
        
    $header .= "Reply-To: " $_POST['sender_nome'] . " <" $_POST['sender_mail'] . ">\r\n";
        
    $header .= "X-Mailer: PHP/" phpversion() . "\r\n";
        
    $header .= "X-Priority: 1\r\n"
    and put it in the end, because it was sending the e-mail before the code put the data inside it... i changed, but although it still doesn't work...



    Is anyone here who can figure what's wrong with this inscription form????...

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

    Default

    Does mail() return true or false?
    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!

  9. #9
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    27
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    It just doesn't... no feedback of any kind is sent... seriouslly i'm starting to dispair...

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

    Default

    It is listed as a boolean function. This means it must return either true or false. Please check its return value with an if statement.
    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!

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
  •