Page 1 of 1
Text area in an email expands the table - help please.
Posted: Mon May 10, 2010 10:20 am
by hot_ice1027
Hello,
I have a form that is when filled up and submitted, should send me an email in a form of a table.
The table has only two columns and about 15 rows.
For some reason, when user enters anything in text areas, it expands the table that I get via the email.
The first column gets smaller in the process.
The thing is it worked before as supposed to.
I did a couple of changes to the css page that shouldn't have affected the php code.
I appreciate your tips and suggestions.
Thanks!
Re: Text area in an email expands the table - help please.
Posted: Mon May 10, 2010 1:15 pm
by califdon
Show us your code that creates the email body.
Re: Text area in an email expands the table - help please.
Posted: Tue May 11, 2010 10:33 am
by hot_ice1027
Code: Select all
<?php
$fname = $_POST['first_name'];
$mname = $_POST['middle_name'];
$lname = $_POST['last_name'];
$month = $_POST['month'];
$day = $_POST['day'];
$year = $_POST['year'];
$gender = $_POST['gender'];
$grade = $_POST['grade'];
$address = $_POST['address'];
$city = $_POST['city'];
$zip = $_POST['zip'];
$ph1 = $_POST['ph1'];
$ph2 = $_POST['ph2'];
$ph3 = $_POST['ph3'];
$m_name = $_POST['m_name'];
$m_occupation = $_POST['m_occupation'];
$mph1 = $_POST['mph1'];
$mph2 = $_POST['mph2'];
$mph3 = $_POST['mph3'];
$m_email = $_POST['m_email'];
$f_name = $_POST['f_name'];
$f_occupation = $_POST['f_occupation'];
$fph1 = $_POST['fph1'];
$fph2 = $_POST['fph2'];
$fph3 = $_POST['fph3'];
$f_email = $_POST['f_email'];
$insurance = $_POST['insurance'];
$sub_name = $_POST['sub_name'];
$sub_number = $_POST['sub_number'];
$g_number = $_POST['g_number'];
$allergy = $_POST['allergy'];
$about = $_POST['about'];
$math = $_POST['math'];
$english = $_POST['english'];
$chess = $_POST['chess'];
$other = $_POST['other'];
$comments1 = $_POST['comments1'];
$student = $_POST['student'];
$program = $_POST['program'];
$placement = $_POST['placement'];
$referred = $_POST['referred'];
$payment = $_POST['payment'];
$photo = $_POST['photo'];
$parent_name = $_POST['parent_name'];
$comments2 = $_POST['comments2'];
$to = 'vlad@mwsm.com';
$subject = 'New Student Application';
$msg = '
<html>
<head><title>NEW APPLICATION!</title></head>
<body>
<table bgcolor=#BFDBFF width=500 border=1 bordercolor=#3399FF cellpadding=4 align=center>
<tr>
<th colspan=2>NEW APPLICATION</th>
</tr>
<tr>
<td width=200>First Name</td>
<td>'.$fname.'</td>
</tr>
<tr>
<td width=200>Middle Name</td>
<td>'.$mname.'</td>
</tr>
<tr>
<td width=200>Last Name</td>
<td>'.$lname.'</td>
</tr>
<tr>
<td width=200>Date of Birth</td>
<td>'.$month. '/' .$day. '/' .$year.'</td>
</tr>
<tr>
<td width=200>Gender</td>
<td>'.$gender.'</td>
</tr>
<tr>
<td width=200>Grade</td>
<td>'.$grade.'</td>
</tr>
<tr>
<td width=200>Address</td>
<td>'.$address.'</td>
</tr>
<tr>
<td width=200>City</td>
<td>'.$city.'</td>
</tr>
<tr>
<td width=200>Zip</td>
<td>'.$zip.'</td>
</tr>
<tr>
<td width=200>Home Phone</td>
<td>'.$ph1 . '-' . $ph2 . '-' . $ph3.'</td>
</tr>
<tr>
<td width=200>Mothers Name</td>
<td>'.$m_name.'</td>
</tr>
<tr>
<td width=200>Mothers Occupation</td>
<td>'.$m_occupation.'</td>
</tr>
<tr>
<td width=200>Mothers Phone</td>
<td>'.$mph1 . '-' . $mph2 . '-' . $mph3.'</td>
</tr>
<tr>
<td width=200>Mothers E-mail</td>
<td>'.$m_email.'</td>
</tr>
<tr>
<td width=200>Fathers Name</td>
<td>'.$f_name.'</td>
</tr>
<tr>
<td width=200>Fathers Occupation</td>
<td>'.$f_occupation.'</td>
</tr>
<tr>
<td width=200>Fathers Phone</td>
<td>'.$fph1 . '-' . $fph2 . '-' . $fph3.'</td>
</tr>
<tr>
<td width=200>Fathers E-mail</td>
<td>'.$f_email.'</td>
</tr>
<tr>
<td width=200>Insurance Name</td>
<td>'.$insurance.'</td>
</tr>
<tr>
<td width=200>Subscribers Name</td>
<td>'.$sub_name.'</td>
</tr>
<tr>
<td width=200>Subscribers Number</td>
<td>'.$sub_number.'</td>
</tr>
<tr>
<td width=200>Group Number</td>
<td>'.$g_number.'</td>
</tr>
<tr>
<td width=200>Allergies</td>
<td>'.$allergy.'</td>
</tr>
<tr>
<td width=200>Heard about MWSM from</td>
<td>'.$about.'</td>
</tr>
<tr>
<td width=200>Interested in Math</td>
<td>'.$math.'</td>
</tr>
<tr>
<td width=200>Interested in English</td>
<td>'.$english.'</td>
</tr>
<tr>
<td width=200>Interested in Chess</td>
<td>'.$chess.'</td>
</tr>
<tr>
<td width=200>Interested in Other</td>
<td>'.$other.'</td>
</tr>
<tr>
<td width=200>Comments on Class</td>
<td>'.$comments1.'</td>
</tr>
<tr>
<td width=200>I am a/an</td>
<td>'.$student.'</td>
</tr>
<tr>
<td width=200>I am enrolling in</td>
<td>'.$program.'</td>
</tr>
<tr>
<td width=200>Placement Test Taken?</td>
<td>'.$placement.'</td>
</tr>
<tr>
<td width=200>I was referred to MWSM by</td>
<td>'.$referred.'</td>
</tr>
<tr>
<td width=200>Method of Payment</td>
<td>'.$payment.'</td>
</tr>
<tr>
<td width=200>Authorized photo use?</td>
<td>'.$photo.'</td>
</tr>
<tr>
<td width=200>General Comments</td>
<td>'.$comments2.'</td>
</tr>
<tr>
<td colspan=2 align=center>By signing this application I <font color=red> ' .$parent_name .' </font>confirm that I have received and agree to abide by MWSM policies.</td>
</tr>
</table>
</body>
</html>
';
header('Location: thanks.html');
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail($to, $subject, $msg, $headers);
exit();
?>
Here it is.
It's the comments1 and comments2 fields that are giving me a headache.
Thanks.