Originally posted by Motoma
I am so ignorant sometimes. :)
I am embarrased to say this, but I forgot the php tags. Arggg.. See what being a N-E-W-B-I-E gets ya? How long before this newbish thing goes away?
foreach($resArr as $user) {
echo ' <tr>';
echo "\n";
echo ' <td colspan="2">';
echo "\n";
echo ' <table width="100%" cellpadding="0" cellspacing="0" border="0">';
echo "\n";
echo ' <tr>';
echo "\n";
echo ' <td>Incident Type:</td>';
echo "\n";
echo ' <td><p>'.$user['license_Number'].'</p></td>';
echo "\n";
echo ' <td>Dispatch Time:</td>';
echo "\n";
echo ' <td><p>'.$user['zip_Code'].'</p></td>';
echo "\n";
echo ' </tr>';
echo "\n";
echo ' <tr>';
echo "\n";
echo ' <td>Source of Call:</td>';
echo "\n";
echo ' <td><p>'.$user['license_Number'].'</p></td>';
echo "\n";
echo ' <td>10-97:</td>';
echo "\n";
echo ' <td><p>'.$user['zip_Code'].'</p></td>';
echo "\n";
echo ' </tr>';
echo "\n";
echo ' </table>';
echo "\n";
echo ' </td>';
echo "\n";
echo ' </tr>';
echo "\n";
<?php
foreach($resArr as $user) {
echo '
<tr>
<td colspan="2">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr class="yellow">
<td><h6>REPORTING PARTY</h6></td>
</tr>
</table>
</td>
</tr>';
echo ' <tr><td></td></tr><tr><td>'.$user['license_Number'].'</td></tr>';
}
?>
VICTIM (Heading) (Now under this heading there *may* be or *may not be* a victim to add to my template form. The way I have your foreach loop set up is that it looks for data from the PK field of the victim table and prints or echos the victim's data if it is there. If not, it just goes on to the next php foreach loop for the [i]next[/i] heading. So we would have the VICTIM heading and the data just under that like so: VICTIM Name: (pull name from the database) Address: (pull address from the database) City: (pull city from the database)
SELECT `customer_location`.`customer_Number_Seq`, `customer`.`name`, `address`.`address_1`, `address`.`address_2`, `city_zip`.`city`, `city_zip`.`state`, `address`.`zip`, `address`.`address_Description`, `address`.`district_Seq`, `person`.`last_Name`, `employee`.`employee_Seq` FROM `rel_customer_location_address` Inner Join `customer_location` ON `customer_location`.`customer_Location_Seq` = `rel_customer_location_address`.`customer_Location_Seq` Inner Join `address` ON `address`.`address_Seq` = `rel_customer_location_address`.`address_Seq` Inner Join `customer` ON `customer`.`customer_Number_Seq` = `customer_location`.`customer_Number_Seq` Inner Join `city_zip` ON `city_zip`.`zip` = `address`.`zip` Inner Join `rel_person_address` ON `address`.`address_Seq` = `rel_person_address`.`address_Seq` Inner Join `person` ON `rel_person_address`.`person_Seq` = `person`.`person_Seq` Inner Join `role` ON `person`.`person_Seq` = `role`.`person_Seq` Inner Join `employee` ON `role`.`role_Seq` = `employee`.`role_Seq` Inner Join `rel_employee_incident` ON `employee`.`employee_Seq` = `rel_employee_incident`.`employee_Seq`
<table> <tr> <td>Name:</td> <td>mysql data name field</td> </tr> <tr> <td>Address:</td> <td>mysql data address field</td> </tr> <tr> <td>City:</td> <td>mysql data city field</td> </tr> </table> Both of the following php codes are inside my html "template".
Comment