Grow your CSS skills. Land your dream job.

HELP! FORM USING PHP??

  • # December 20, 2011 at 3:25 pm

    Hello,
    I am working on a site which is in a different language, and have added a form to a page called request when clicked submit it is processed by a page called contact.php and so when the user has clicked submit they should be redirected to a page called thankyou.html letting them kno3 their message has been sent, i have put the HTML and PHP code for the form below, and wondering if someone can me know what is the issue with the form because it is not letting me sent an email it displays message failed every time i try the form and is not connecting to thankyou.html , so let me know, thanks.

    HTML

    نام دستگاه

    برند دستگاه

    ظرفیت دستگاه

    مدل دستگاه

    سال ساخت دستگاه

    توضیحات اضافی

    نام و نام خانوادگی شما

    تلفن همراه

    تلفن ثابت

    فکس

    ایمیل

    توضیحات اضافی

    PHP,
    < ?php

    $nmachine = $_POST ;
    $bmachine = $_POST ;

    if(isset($nmachine) && isset($bmachine) ){
    $headers = ‘MIME-Version: 1.0′ . “rn”;
    $headers .= ‘Content-type: text/html;charset=utf-8′ . “rn”;
    $headers .= “company name”;
    $to= ‘email@gmail.com';
    $subject= ‘company form';
    $message= “$nmachine, $bmachine”;
    if(@mail($to, $subject, $message,$headers)){
    header(“location:./thankyou.html”);
    }
    }
    else{
    echo “Message Failed”;

    }

    ?>

    # December 20, 2011 at 3:36 pm

    Please do not double post.

    http://css-tricks.com/forums/discussion/15146/help-asapphp-form-not-workingsss

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘HELP! FORM USING PHP??’ is closed to new replies.

*May or may not contain any actual "CSS" or "Tricks".