Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 3 of 3
  1. #1
    Platinum Lifetime Member

    Join Date
    Dec 2005
    Posts
    985
    DNF$
    5,297
    Bank
    0
    Total DNF$
    5,297
    Donate  

    Contact us form, utf-8 and php??

    Im trying to build a contact us form and have gotten this far:
    (Courtesy of Google!)

    Anybody know what I have to do to this bit of code to make it send me the email in a variety of languages (Including English)
    I am lost when it comes to php so if someone knows can you show me what I have to do?

    <?php
    if(isset($_POST['submit'])) {

    $to = "xxxxxx@domainname.com";
    $subject = "Submissions";
    $name_field = $_POST['name'];
    $email_field = $_POST['email'];
    $message = $_POST['message'];

    $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";

    mail($to, $subject, $body);

    } else {

    echo "blarg!";

    }
    ?>

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    This is the form Im trying to use, but if I enter languages other than English the email I recieve is a random (to me anyway!) string of characters and is unreadable.



    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-utf-8">
    <title>Name</title>
    </head>

    <body>
    <form method="POST" action="mailer.php">
    <p align="center">Name:
    <input type="text" name="name" size="19"><br>
    <br>
    Email:
    <input type="text" name="email" size="19"></p>
    <p align="center">Comments:<br>
    <br>
    <textarea rows="9" name="message" cols="30"></textarea>
    <br>
    <br>
    <input type="submit" value="Submit" name="submit">
    </p>
    </form>

    </body>

    </html>

    Any help is appreciated, thanks

  2. #2
    Vincent
    domainoffers.biz's Avatar
    Join Date
    Apr 2006
    Location
    Indonesia
    Posts
    445
    Country

    Indonesia
    DNF$
    5,325
    Bank
    0
    Total DNF$
    5,325
    Donate  

    Re: Contact us form, utf-8 and php??

    PM me Please, I have a nice contact us form in php code, it is a free script, and i will send you the nice contact us form of php code, it verify the neccessary fields as what you want, by modifying a little,
    the default verify fields for validation are : Name, Email, Subject, and The body of message.
    I will send you the nice free script to you freely.
    Have a nice contact us form.
    SELFISH IS A VIRUS THAT CAN RUIN HUMAN WORLD - (Motto from : Smith Gladstone)
    ----
    SELF CONTROL IS JUST LIKE A PERFECT WEAPON TO FIGHT THE EVIL MIND THAT STAYED INSIDE OUR SELF.

  3. #3
    Country hopper
    katherine's Avatar
    Join Date
    Jul 2005
    Location
    Free World
    Posts
    7,499
    Country

    Iceland
    DNF$
    30,536
    Bank
    0
    Total DNF$
    30,536
    Donate  

    Re: Contact us form, utf-8 and php??

    Actually you need to add a header and set the character set to UTF-8 otherwise it will use a default like US encoding. I would recommend using classes like phpmailer and this will simplify the job.
    Feel free to PM if you need help.
    Last edited by sdsinc; 06-05-2007 at 03:47 AM. Reason: typo
    NameNewsletter.com - free lists of available domain names
    ZoneFiles.net (beta) - ccTLD and gTLD droplists

Similar Threads

  1. Replies: 1
    Last Post: 07-21-2006, 01:13 AM
  2. Replies: 0
    Last Post: 04-22-2006, 08:21 PM
  3. Script modification PHP / MYSQL
    By DaveRH in forum Help Wanted!
    Replies: 0
    Last Post: 07-05-2005, 10:34 AM

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
  •  

Domain name forum recommended by Domaining.com