The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End ISSUE! Form Not collecting information???

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #35715

    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 know that their message is sent, i have edited the php form so when i click submit the form is sent and i am redirected to the thankyou.html viewing my message is ent however the php is not collecting all the information from the request page because when i view the email i just see the subject line, and couple of the information collected, so please let me know how this issue can be solved, thanks.


    نام دستگاه

    برند دستگاه

    ظرفیت دستگاه

    مدل دستگاه

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

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

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

    تلفن همراه

    تلفن ثابت



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


    $nmachine = $_POST ;
    $bmachine = $_POST ;
    $zmachine = $_POST ;
    $mdmachine = $_POST ;
    $smachine = $_POST ;
    $t1machine = $_POST ;
    $yname = $_POST ;
    $yp = $_POST ;
    $ym = $_POST ;
    $fax = $_POST ;
    $email = $_POST ;
    $t2machine = $_POST ;
    $submit = $_POST ;

    $sendTo = "[email protected]";
    $subject = "company form";
    $message = "$t1machine
    from $yname, $yp";

    $headers = "From: $yname <$email> rn";
    $headers .= "X-Mailer:PHP/rn";
    $headers .= "MIME-Version:1.0rn";
    $headers .= "Content-type:text/plain; charset=iso-8859-1rn";

    $sent = mail($sendTo, $subject, $message, $headers);

    if ($sent) {
    echo "Message Failed";


    i think is the mail function structure.
    mail is structured like that : to, subject, message.
    After message you can put additional headers informations.
    so i think is better do like that ( this is a very quick and basic way ) :

    $field1 = $_POST ;
    $field2 = $_POST ;

    if(isset($field1) && isset($field2)){
    $headers = 'MIME-Version: 1.0' . "rn";
    $headers .= 'Content-type: text/html;charset=utf-8' . "rn";
    $headers .= "From:Your site name";
    $to= 'your email';
    $subject= 'Email from etc...';
    $message= "$field1 is the first field you type. $field2 is the second one.";
    if(@mail($to, $subject, $message,$headers)){
    header("Location: thanks.html");
    header("Location: error.html");
    echo 'complete the form.';


    i hope this is correct and helps you! :)


Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.