Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

problem with php mail function with a few variables

the mail() function

Moderators: macek, egami, gesf

problem with php mail function with a few variables

Postby zero » Tue Sep 20, 2011 2:56 am

Hi all,

i have a problen with mail function php and i want to help me.

I have a create html form, with some fields examples "firstname,lastname,tel,address.....".
The fields is about 60.

I use this php code for send data where typing the user inside the field to mail@gmail.com.
The mail send regularly without error and data send regularly in the mail.

That become only first 50 fields.From there and down do not save data inside the variable and i cannot data in mailbox.
I have see html and php code and i am sure that do not syntax error examples "'',;;...{}[]()".
This is my phhcode

Code: Select all
    <?php

    if(isset($_POST['submit'])) {


       $to = "mail@gmail.com";
       $subject = "SendMail";

       $name_field = $_POST['FirstName'];
       $name1_field = $_POST['LastName'];
    //.........
    //........
    //.......
    //Until variable $name50_field  data save inside the variable
    //From there and down do not save
    //.....
    //....
    //...

       $email_field = $_POST['email'];
            $message = $_POST['message'];

                    foreach($_POST['check'] as $value) {

          $check_msg .= "Checked: $value\n";

       }

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

    echo "The mail has been send succesfully $to!";

         header("Refresh: 3; url=\"http://www.mydomain.com\"");


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

    } else {

       echo "error";

    }

    ?>


Is there other way to send much data to mailbox with html form and php code?

Thanks you, and sorry for my bad english.
zero
New php-forum User
New php-forum User
 
Posts: 1
Joined: Mon Sep 19, 2011 5:01 am

Re: problem with php mail function with a few variables

Postby bigjoe11a » Tue Sep 27, 2011 8:35 pm

Hi! zero, I will need the HTML template your using. I need to see how your form is setup.

Joe
User avatar
bigjoe11a
New php-forum User
New php-forum User
 
Posts: 128
Joined: Wed Aug 31, 2011 3:55 am
Location: USA


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.