Log in

View Full Version : php script not sending all data from a form



stealthmode666
01-03-2009, 10:00 PM
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.


<?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?

stealthmode666
01-03-2009, 11:02 PM
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?

jackbenimble4
01-04-2009, 04:53 AM
I don't really understand what the problem is.

Also, at one point you have:


$_POST['forname1']

I figure that's probably a misspelling for:


$_POST['forename1']

stealthmode666
01-04-2009, 11:06 AM
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.

JasonDFR
01-05-2009, 07:12 PM
Post your whole script please.

J

l_kris06
01-06-2009, 06:52 PM
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.