stealthmode666 Posted December 17, 2008 Author Share Posted December 17, 2008 Okay, going backwards and forwards. It displays the fields as html instead of plain text. now my checkboxes don't display the answer :on but they did before and the form field for textarea shows the tag name but is not picking up what the user typed in the box. cure one issue and create another but i'll get to that later. $body = "Robert. You have received these contact details .com:<br /><br />"; $body .= "<table>"; foreach($fields as $a => $b) { $body .= "<tr><th>" . $a . "</th><td>" . $_REQUEST[$a] . "</td></tr>"; } #$Body .= "<tr>"; #$Body .= "<td width=\"200px\">Member Name</td><td width=\"400px\"> $_POST{['Member_Name']} </td>"; #$Body .= "</tr><tr>"; #$Body .= "<td>Members Contact Number</td><td> $_POST{['telephone']} </td>"; #$Body .= "</tr></table>"; I commented out the tags above and re-ran the form. It displays all fields in rows which looks better than plain text so I believe the html part is working as email also displays MIME version:1.0 The table I made above for the Member_Name and telephone had no effect on the sent data. Quote Link to comment Share on other sites More sharing options...
stealthmode666 Posted December 17, 2008 Author Share Posted December 17, 2008 $body = "Robert. You have received these contact details .com:<br /><br />"; $body .= "<table>"; foreach($fields as $a => $b) { $body .= "<tr><th>" . $a . "</th><td>" . $_REQUEST[$a] . "</td></tr>"; } $Body .= "<tr>"; $Body .= "<td width=\"200px\">Member Name</td><td width=\"400px\"> {$_POST['Member_Name']} </td>"; $Body .= "</tr><tr>"; $Body .= "<td>Members Contact Number</td><td> {$_POST['telephone']} </td>"; $Body .= "</tr></table>"; You will notice I now put the {} in the right place. All my fields in the array are displaying in html in the email, but my table above which has a couple of the form fields does nothing? Or is it displaying as the table says and just adding all the other fields in rows underneath it. The reason I ask is if I comment out the lines below $Body .= "<tr>"; $Body .= "<td width=\"200px\">Member Name</td><td width=\"400px\"> {$_POST['Member_Name']} </td>"; $Body .= "</tr><tr>"; $Body .= "<td>Members Contact Number</td><td> {$_POST['telephone']} </td>"; $Body .= "</tr></table>"; The email is still the same as in it displays all the fields in html format with or with-out this lines of code. Sorry to be new to .php but thanks all who are tring to help me even if I seem slow to understand. Quote Link to comment Share on other sites More sharing options...
phpian Posted December 17, 2008 Share Posted December 17, 2008 hey stealthmode666, can you go through and everywhere you find $Body change it to $body. then run it and see if that's any better. Quote Link to comment Share on other sites More sharing options...
stealthmode666 Posted December 17, 2008 Author Share Posted December 17, 2008 Okay, thanks for that, it now displays the correct format of the two fields I've used as in Members Name & Members Contact Number. Problem now is It displays all this under the original array of data fields. So how do I now get my script not to display the fields in the array and only display the fields in the table. I'm thinking I'm using two ways to display the data so do I start to delete the fields in the array as I'm using post to now show the data from the form field? Quote Link to comment Share on other sites More sharing options...
phpian Posted December 17, 2008 Share Posted December 17, 2008 sorry if i'm following you exactly... remove these lines: foreach($fields as $a => $b) { $body .= "<tr><th>" . $a . "</th><td>" . $_REQUEST[$a] . "</td></tr>"; } is that what you want? Quote Link to comment Share on other sites More sharing options...
stealthmode666 Posted December 17, 2008 Author Share Posted December 17, 2008 Yes, this is what I want, I will plug away until now I have my 100 fields for the applicant working and the other 100 fields for the joint applicant making about 200 fields. I want the email to display the fields in two columns which has about 100 rows each. Also the email header now has this on the end which I don't want. me@someone.co.ukMIME-Version1.0 It's picking this up from the header but how do I code it not to add it to the Email header? Quote Link to comment Share on other sites More sharing options...
stealthmode666 Posted December 17, 2008 Author Share Posted December 17, 2008 I will mark this thread as solved and all I can say is thank-you to the immense work and input from all that helped me with this. I will start a new thread for the other problems I encounter along the way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.