Results 1 to 5 of 5

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: May:2012
    Location: plovdiv
    Posts: 4

    PHP contact form

    , . .

    Code:
    <?php
    session_start(); 
    $name = $_GET['name'];
    $email = $_GET['email'];
    $message = $_GET['message'];
    $subject = '     :' . $name;
    if(strtolower($_REQUEST['code']) == strtolower($_SESSION['random_number']))
    {
    
    $TO = "Email";
    $h = "From: " . $email;
    $content = "$name ($email)    :\n\n$message";
    mail($TO, $subject, $content, $h); 
    echo 1; 
    } 
    else
    {
    echo 0; // invalid code
    }
    ?>

  2. #2
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    $h = .....
    :

    $h = 'Content-type: text/plain; charset="utf-8"'."\r\n";
    $h .= "From: $email\r\n";
    $h .= "Reply-To: $email";

    , ( , , - HTTP ), - UTF-8 .

  3. #3
    Registered User
    Join Date: May:2012
    Location: plovdiv
    Posts: 4
    tedych , , utf-8

  4. #4
    Registered User
    Join Date: Jul:2006
    Location:
    Posts: 1,071
    Subject- ( "from" , , email ), :

    PHP Code:
    $subject '=?utf-8?B?' base64_encode($subject) . '?='
    mail().

  5. #5
    Registered User
    Join Date: Mar:2009
    Location:
    Posts: 169

Posting Permissions

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

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |