473,320 Members | 2,122 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

changing a 2 column 'report' into a 4 column 'report'

8
Hi folks, I probably used the term 'report' incorrectly. Sorry for that in advance.

The below code produces a 2 column web page that shows in the first column a picture and the 2nd column shows the person's name and address ad a few other things.

What I would like is to change this into a 4 column report with no duplication.

Could somebody help me with this, I'm sure it's simple enough but when your new to programming it all looks difficult.

Thanks for your assistance


Expand|Select|Wrap|Line Numbers
  1. ..
  2. <?php require_once('Connections/buddies.php'); ?>
  3. <?php
  4. mysql_select_db($database_buddies, $buddies);
  5. $query_testrecordset = "SELECT id, first_name, last_name, address_1, address_2, city, `state`, zipcode, homeemail,workemail, photo_large FROM contact ORDER BY last_name";
  6. $testrecordset = mysql_query($query_testrecordset, $buddies) or die(mysql_error());
  7. $row_testrecordset = mysql_fetch_assoc($testrecordset);
  8. $totalRows_testrecordset = mysql_num_rows($testrecordset);
  9. ?>
  10. <style type="text/css">
  11. <!--
  12. .style2 {color: #000000}
  13. .style3 {font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, sans-serif;}
  14. .style4 {font-weight: bold; font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif color: #CC0000};
  15. .style5 { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;   color: #0000FF;}
  16.  
  17. body {
  18.     background-image: url(images/buddy/gradient23550953.png);
  19.     background-repeat: repeat-x;
  20.     background-attachment: fixed;
  21. }
  22. -->
  23. </style>
  24. </head>
  25. <body>
  26. <p align="left" class="style3">Dive Buddies </p>
  27. <a href="http://localhost/scuba/index.html">Home</a>
  28. <a href="http://localhost/scuba/contactinput.php">Add a Dive Buddy,</a>
  29.  
  30. <table width="450" height="110" border="2" cellpadding="5" bgcolor="#000000">
  31.   <?php do { ?>
  32.     <tr>
  33.       <td width="79" height="107" bordercolor="#FFFFFF" bgcolor="#000000"><img src="/scuba/images/buddy/<?php echo $row_testrecordset['photo_large']; ?>" alt="<?php echo $row_testrecordset['first_name']; ?>"></td>
  34.       <td width="300" bgcolor="#FFFFFF"><p align="right" class="style3"><span class="style3"><?php echo $row_testrecordset['first_name']; ?> <?php echo $row_testrecordset['last_name']; ?><br>
  35.           <?php echo $row_testrecordset['address_1']; ?> <br> 
  36.           <?php echo $row_testrecordset['address_2']; ?> <br>
  37.           <?php echo $row_testrecordset['city']; ?>  <?php echo $row_testrecordset['state']; ?><br>
  38.           <?php echo $row_testrecordset['zipcode']; ?></span><br>
  39.           <?php echo $row_testrecordset['homeemail']; ?></span><br>
  40.           <?php echo $row_testrecordset['workemail']; ?></span><br>
  41.         <p align="left" class="style5">Total Dives w/ this buddy: </p>
  42.  
  43.                     <p>&nbsp;</p>
  44.       <p>&nbsp; </p></td>
  45.     </tr>
  46.  
  47.     <?php } while ($row_testrecordset = mysql_fetch_assoc($testrecordset)); ?>
  48. </table>
  49. <a href="http://localhost/scuba/index.html">Home</a>
  50. <a href="http://localhost/scuba/contactinput.php">Add a Dive Buddy,</a>
  51. <p><br>
  52. &nbsp;&nbsp;</p>
  53. </body></html>
  54. <?php
  55. mysql_free_result($testrecordset);
  56. ?>
  57.  
  58. ..
Aug 24 '07 #1
1 1439
dlite922
1,584 Expert 1GB
in the above you have this:

Expand|Select|Wrap|Line Numbers
  1. <tr>
  2.     <td>[ PICTURE HERE ]</td>
  3.     <td>INFO HERE</td>
  4. </tr>
  5.  
  6.  
what you need is two more of those <td> </td> pair of tags.

Expand|Select|Wrap|Line Numbers
  1. <tr>
  2.     <td>[ PICTURE HERE ]</td>
  3.     <td>2nd Column</td>
  4.     <td>3rd Column</td>
  5.     <td>4th Column</td>
  6. </tr>
  7.  
its HTML related, not PHP related by the way.
Mar 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: amber | last post by:
Hello, I have a report in VB.NET/Crystal Reports. I have a criteria form that users select between 2 different types of grouping (group by category or group by year). Can I programmatically...
3
by: jeffgeorge | last post by:
Working on a report oriented application. One of the columns on a form needs to be red, black or blue depending of the value in that column. Can I write an expression to handle this or does...
8
by: Donna Sabol | last post by:
First, I should start by saying I am creating a database to be used by some very impatient, non-computer literate people. It needs to be seameless in it's operation from their point of view. I...
0
by: bill mahoney | last post by:
I have access 2k and I have 2 tables. One is a 7X6 table representing a month with zeroes padding the fields where no day exist. For example February 2003 0 0 0 0 0 0 1 2 3 4 5 6 7 ...
2
by: ColinWard | last post by:
Hi. I have a form which has as its recordsource an SQL string. The SQL String is as follows: SELECT * from CONTACTS where false. this ensures that there is no data loaded in the form when the...
0
by: Nip | last post by:
I have created a report that gives me a value from one table and then shows a list of values from another table. When the report is viewed the list of things that shows is looks one after the...
19
by: Owen T. Soroke | last post by:
Using VB.NET I have a ListView with several columns. Two columns contain integer values, while the remaining contain string values. I am confused as to how I would provide functionality to...
4
by: MLH | last post by:
I have a report and on it, a subreport control Main Report Name: rptInvoiceMain Sub Report Name: rptInvoiceSubReport SubReport Control Name: rptInvoiceSubReportCtl The...
3
by: Deano | last post by:
I have a nice report that uses sql to report employee absences. I grab the employee and related absence data using the employee id field which is unique. I use the employee id as a header on...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.