Results 1 to 6 of 6

Thread: php script not sending all data from a form

  1. #1
    Join Date
    Dec 2008
    Posts
    20
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default php script not sending all data from a form

    I have a processing script that takes form fields and inserts them into a formatted table which is the outcome of the email.
    The script runs then seems to just give up processing and sends the form data as setout in my script but only up to a point.
    I can't understand why a script would only process up to a certain line everytime then send the data regardless.
    Code:
    <?php
    $body = 'Robert. You have received these contact details .com:<br /><br />'.
    '<table align="left", border="1px">'.
    '<tr>'.
    '<td width="200px">Member Name</td><td width="200px"> '.$_POST['Member_Name']. '</td><td width="200px"></td><td width="200px"></td>'.
    '</tr><tr>'.
    '<td>Members Contact Number</td><td> '.$_POST['telephone'].'</td>'.
    '</tr><tr>'.
    '<td>Members Email Address</td><td> '.$_POST['Email'].'</td>'.
    '</tr><tr>'.
    '<td>Loan Amount</td><td> '.$_POST['Loan_Amount'].'</td>'.
    '</tr>&nbsp;<tr>'.
    '<td>&nbsp;</td>'.
    
    //applicant details
    '</tr><tr>'.
    '<th>Main Applicant</th><td>&nbsp;</td><th>Joint Applicant</th>'.
    '</tr><tr>'.
    '<td>Title</td><td> '.$_POST['title'].'</td><td>Title</td><td> '.$_POST['title1'].'</td>'.
    '</tr><tr>'.
    '<td>Surname</td><td> '.$_POST['surname']. '</td><td>Surname</td><td> '.$_POST['surname1']. '</td>'.
    '</tr><tr>'.
    '<td>Forname(s)</td><td> '.$_POST['forename']. '</td><td>Forename(s)</td><td> '.$_POST['forname1']. '</td>'.
    '</tr><tr>'.
    '<td>Residential Address</td><td> '.$_POST['residential']. '</td><td>Residential Address</td><td> '.$_POST['residential1']. '</td>'.
    '</tr><tr>'.
    '<td>Town</td><td> '.$_POST['town']. '</td><td>Town</td><td> '.$_POST['town1']. '</td>'.
    '</tr><tr>'.
    '<td>County</td><td> '.$_POST['county']. '</td><td>County</td><td> '.$_POST['county1']. '</td>'.
    '</tr><tr>'.
    '<td>Post Code</td><td> '.$_POST['postcode']. '</td><td>Post Code</td><td> '.$_POST['post1']. '</td>'.
    '</tr></table>';
    ?>
    If I use the close table tag above the line Post Code the email has all the data formatted in rows and columns. After this it just inserts half the next line in the email and sends it.
    Is there a limit to what I can process and send as an html email?
    Last edited by stealthmode666; 01-03-2009 at 10:02 PM. Reason: better explanation of what is happening

  2. #2
    Join Date
    Dec 2008
    Posts
    20
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default

    would it make any difference if I was to use a template for the form data and send it as an attachment in the email?
    Would this be a better way to send the form data as somehow the email I am getting is only up to a certain point in my script.

    Really need help here as at a loss as in how to get ALL the form data to me from my form. any suggestions?

  3. #3
    Join Date
    Aug 2007
    Location
    Ohio
    Posts
    79
    Thanks
    0
    Thanked 15 Times in 15 Posts

    Default

    I don't really understand what the problem is.

    Also, at one point you have:

    PHP Code:
    $_POST['forname1'
    I figure that's probably a misspelling for:

    PHP Code:
    $_POST['forename1'

  4. #4
    Join Date
    Dec 2008
    Posts
    20
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default

    yes a spelling mistake but i have it this way on my form so it's the same in my code so no difference.
    The problem is the email that comes has a certain amount of lines from the processing in it and nothing beyond. It always only sends a certain amount of data. The script runs to a certain point. Can it be anything to do with my email client? the hosting server? I'm asking for any possible reasons why an email would only contain a certain amount of data and no more as I don't see a problem with my script.

  5. #5
    Join Date
    Apr 2008
    Location
    Limoges, France
    Posts
    395
    Thanks
    13
    Thanked 61 Times in 61 Posts

    Default

    Post your whole script please.

    J

  6. #6
    Join Date
    Dec 2008
    Location
    Fremont, CA
    Posts
    30
    Thanks
    1
    Thanked 7 Times in 7 Posts

    Default

    when the script encounters an interrupt probably bacause of a syntax issue, all further parsing stops in certain cases though i cant be more specific. The half processed file might spit out some results.

    However i dont see an issue in ur code posted. Post the entire code, and somebody would be able to help u out.

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
  •