Hi, I'm new to the forum and new to php. I'm not sure if I'm using the correct terminology so here it goes. I've created a page with multiple forms that when submitted get emailed to a certain address. When I receive the email it shows up as one big paragraph, but I would like it to appear similar to how the form looks. Any help would be greatly appreciated.
Thanks, Jason
<form method="post" form action="paytest.php">
<table width="541" border="1">
<tr>
<th width="115">Day</th>
<th width="73">Date</th>
<th width="73">Flat Rates</th>
<th width="78">Overnights</th>
<th width="77">Perdiem</th>
<th width="85">N #</th>
</tr>
<tr>
<td>SUNDAY</td>
<td><input type="text" size="10" maxlength="40" textarea name="date1"></td>
<td><input type="text" size="10" maxlength="40" textarea name="flatrate1"></td>
<td><input type="text" size="10" maxlength="40" textarea name="overnights1"></td>
<td><input type="text" size="10" maxlength="40" textarea name="perdiem1"></td>
<td><input type="text" size="10" maxlength="40" textarea name="tailnumber1"></td>
</tr>
<tr>
<td>MONDAY</td>
<td><input type="text" size="10" maxlength="40" name="date2"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate2"></td>
<td><input type="text" size="10" maxlength="40" name="overnights2"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem2"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber2"></td>
</tr>
<tr>
<td>TUESDAY</td>
<td><input type="text" size="10" maxlength="40" name="date3"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate3"></td>
<td><input type="text" size="10" maxlength="40" name="overnights3"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem3"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber3"></td>
</tr>
<tr>
<td>WEDNESDAY</td>
<td><input type="text" size="10" maxlength="40" name="date4"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate4"></td>
<td><input type="text" size="10" maxlength="40" name="overnights4"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem4"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber4"></td>
</tr>
<tr>
<td>THURSDAY</td>
<td><input type="text" size="10" maxlength="40" name="date5"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate5"></td>
<td><input type="text" size="10" maxlength="40" name="overnights5"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem5"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber5"></td>
</tr>
<tr>
<td>FRIDAY</td>
<td><input type="text" size="10" maxlength="40" name="date6"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate6"></td>
<td><input type="text" size="10" maxlength="40" name="overnights6"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem6"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber6"></td>
</tr>
<tr>
<td>SATURDAY</td>
<td><input type="text" size="10" maxlength="40" name="date7"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate7"></td>
<td><input type="text" size="10" maxlength="40" name="overnights7"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem7"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber7"></td>
</tr>
<tr>
<td>SUNDAY</td>
<td><input type="text" size="10" maxlength="40" name="date8"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate8"></td>
<td><input type="text" size="10" maxlength="40" name="overnights8"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem8"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber8"></td>
</tr>
<tr>
<td>MONDAY</td>
<td><input type="text" size="10" maxlength="40" name="date9"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate9"></td>
<td><input type="text" size="10" maxlength="40" name="overnights9"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem9"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber9"></td>
</tr>
<tr>
<td>TUESDAY</td>
<td><input type="text" size="10" maxlength="40" name="date10"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate10"></td>
<td><input type="text" size="10" maxlength="40" name="overnights10"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem10"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber10"></td>
</tr>
<tr>
<td>WEDNESDAY</td>
<td><input type="text" size="10" maxlength="40" name="date11"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate11"></td>
<td><input type="text" size="10" maxlength="40" name="overnights11"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem11"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber11"></td>
</tr>
<tr>
<td>THURSDAY</td>
<td><input type="text" size="10" maxlength="40" name="date12"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate12"></td>
<td><input type="text" size="10" maxlength="40" name="overnights12"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem12"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber12"></td>
</tr>
<tr>
<td>FRIDAY</td>
<td><input type="text" size="10" maxlength="40" name="date13"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate13"></td>
<td><input type="text" size="10" maxlength="40" name="overnights13"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem13"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber13"></td>
</tr>
<tr>
<td>SATURDAY</td>
<td><input type="text" size="10" maxlength="40" name="date14"></td>
<td><input type="text" size="10" maxlength="40" name="flatrate14"></td>
<td><input type="text" size="10" maxlength="40" name="overnights14"></td>
<td><input type="text" size="10" maxlength="40" name="perdiem14"></td>
<td><input type="text" size="10" maxlength="40" name="tailnumber14"></td>
</tr>
</table>
<input type="submit" value="Send"> <br />
</form>
paytest.php
<?php
$to = "test@test.com" ;
$subject = "paysheet" ;
$text.='date:'.$_REQUEST["date1"] ;
$text.='flat rate:'.$_REQUEST["flatrate1"] ;
$text.='over nights:'.$_REQUEST["overnights1"] ;
$text.='perdiem:'.$_REQUEST["perdiem1"] ;
$text.='tail number:'.$_REQUEST["tailnumber1"] ;
$text.='date:'.$_REQUEST["date2"] ;
$text.='flat rate:'.$_REQUEST["flatrate2"]. "
" ;
$text.='over nights:'.$_REQUEST["overnights2"] ;
$text.='perdiem:'.$_REQUEST["perdiem2"] ;
$text.='tail number:'.$_REQUEST["tailnumber2"] ;
$text.='date:'.$_REQUEST["date3"] ;
$text.='flat rate:'.$_REQUEST["flatrate3"] ;
$text.='over nights:'.$_REQUEST["overnights3"] ;
$text.='perdiem:'.$_REQUEST["perdiem3"] ;
$text.='tail number:'.$_REQUEST["tailnumber3"] ;
$text.='date:'.$_REQUEST["date4"] ;
$text.='flat rate:'.$_REQUEST["flatrate4"] ;
$text.='over nights:'.$_REQUEST["overnights4"] ;
$text.='perdiem:'.$_REQUEST["perdiem4"] ;
$text.='tail number:'.$_REQUEST["tailnumber4"] ;
$text.='date:'.$_REQUEST["date5"] ;
$text.='flat rate:'.$_REQUEST["flatrate5"] ;
$text.='over nights:'.$_REQUEST["overnights5"] ;
$text.='perdiem:'.$_REQUEST["perdiem5"] ;
$text.='tail number:'.$_REQUEST["tailnumber5"] ;
$text.='date:'.$_REQUEST["date6"] ;
$text.='flat rate:'.$_REQUEST["flatrate6"] ;
$text.='over nights:'.$_REQUEST["overnights6"] ;
$text.='perdiem:'.$_REQUEST["perdiem6"] ;
$text.='tail number:'.$_REQUEST["tailnumber6"] ;
$text.='date:'.$_REQUEST["date7"] ;
$text.='flat rate:'.$_REQUEST["flatrate7"] ;
$text.='over nights:'.$_REQUEST["overnights7"] ;
$text.='perdiem:'.$_REQUEST["perdiem7"] ;
$text.='tail number:'.$_REQUEST["tailnumber7"] ;
$text.='date:'.$_REQUEST["date8"] ;
$text.='flat rate:'.$_REQUEST["flatrate8"] ;
$text.='over nights:'.$_REQUEST["overnights8"] ;
$text.='perdiem:'.$_REQUEST["perdiem8"] ;
$text.='tail number:'.$_REQUEST["tailnumber8"] ;
$text.='date:'.$_REQUEST["date9"] ;
$text.='flat rate:'.$_REQUEST["flatrate9"] ;
$text.='over nights:'.$_REQUEST["overnights9"] ;
$text.='perdiem:'.$_REQUEST["perdiem9"] ;
$text.='tail number:'.$_REQUEST["tailnumber9"] ;
$text.='date:'.$_REQUEST["date10"] ;
$text.='flat rate:'.$_REQUEST["flatrate10"] ;
$text.='over nights:'.$_REQUEST["overnights10"] ;
$text.='perdiem:'.$_REQUEST["perdiem10"] ;
$text.='tail number:'.$_REQUEST["tailnumber10"] ;
$text.='date:'.$_REQUEST["date11"] ;
$text.='flat rate:'.$_REQUEST["flatrate11"] ;
$text.='over nights:'.$_REQUEST["overnights11"] ;
$text.='perdiem:'.$_REQUEST["perdiem11"] ;
$text.='tail number:'.$_REQUEST["tailnumber11"] ;
$text.='date:'.$_REQUEST["date12"] ;
$text.='flat rate:'.$_REQUEST["flatrate12"] ;
$text.='over nights:'.$_REQUEST["overnights12"] ;
$text.='perdiem:'.$_REQUEST["perdiem12"] ;
$text.='tail number:'.$_REQUEST["tailnumber12"] ;
$text.='date:'.$_REQUEST["date13"] ;
$text.='flat rate:'.$_REQUEST["flatrate13"] ;
$text.='over nights:'.$_REQUEST["overnights13"] ;
$text.='perdiem:'.$_REQUEST["perdiem13"] ;
$text.='tail number:'.$_REQUEST["tailnumber13"] ;
$text.='date:'.$_REQUEST["date14"] ;
$text.='flat rate:'.$_REQUEST["flatrate14"] ;
$text.='over nights:'.$_REQUEST["overnights14"] ;
$text.='perdiem:'.$_REQUEST["perdiem14"] ;
$text.='tail number:'.$_REQUEST["tailnumber14"] ;
$header = "from: Jason Smith" ;
$sent = mail($to, $subject, $text, $headers) ;
if($sent)
{print "Your pay sheet was sent successfully"; }
else
{print "We encountered an error sending your mail"; }
?>
extract a file from zip file
hi,i know how to unzip a zip file in php, but is there a way to just extract a certain file only?
FTP issues
Hi all,I am currently facing some serious problems with a script and really need some advise before I am actually sick To give you a brief overview of the situation, I have a script which is going to
need help with php get
i have a option box that gets filled with dates, but how do i get once the option value has been clicked for example they select 2007 from the drop down, it then posts that value back to the same
Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:Code: // listaa sivut$pages = Array ("etusivu" => "etusivu.php",,"linkit" =>
tell csv import script to ignore blank rows?
Hi i have the below script but i get an error if a row is blank ie a return in the csv file at the end i need to somehow tell it to skip the rows that have nothing on them:Code: <?php // define
Bar charts using Graphical Framework.
I am using Graphical Frameworks(GFW) to create a chart Graphic . There is no problem with the data displayed on the bar graph .The problem is that Y-axis of the chart resizes in function to the
Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about because the control being searched for is nested within a container other than the webform.I came
Entering Data Problem
Code: $result = mysql_query("SELECT * FROM flights");while ($row = mysql_fetch_array($result)){if ($flight_num == $row['flight_num']){echo "<center>Flight Number
how to get IP address?
hey guys,i have this code which is supposed to get me the IP address of my site visitors:Code: <?php if ($_SERVER['HTTP_X_FORWARD_FOR']) {$ip = $_SERVER['HTTP_X_FORWARD_FOR'];} else {$ip =
How can use this array as a key?
Say I have this array for example:print_r($array);Prints:Code: [Select]Array( [0] => Array ( [status] => 0 ) [1] => Array (