Printing part of a form with links to further info
Posted: Wed Jan 25, 2006 4:38 am
Hi,
Currently I print all records out from my database to create one large table with all database details.
It occurred to me that this is bad design as users dont need all the information all the time.
I want to print my records so that only a number of colums are printed and then you can click on a certain a [more info field] field to get more information on that particular person/record.
Can anyone provide me with any tips pointers and tutorials to help me do this pease.
Thank you
Below is print part of my code if this helps.
Currently I print all records out from my database to create one large table with all database details.
It occurred to me that this is bad design as users dont need all the information all the time.
I want to print my records so that only a number of colums are printed and then you can click on a certain a [more info field] field to get more information on that particular person/record.
Can anyone provide me with any tips pointers and tutorials to help me do this pease.
Thank you
Below is print part of my code if this helps.
Code: Select all
"<table width=\"50%\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">
<tr>
<td><b><small>RecNo</small></b></td>
<td><b><small></small></b></td>
<td><b><small>Title</small></b></td>
<td><a href=\"orderfirstname.html\"><b><small>First Name</small></b></a></td>
<td><a href=\"ordersurname.html\"><b><small>Surname</small></b></a></td>
<td><a href=\"orderorgdesc.html\"><b><small>Organisation</small></b></a></td>
<td><b><center><small>Role</small></center></b></td>
<td><b><small>Address(1)</small></b></td>
<td><b><small>Address(2)</small></b></td>
<td><b><small>City</small></b></td>
<td><b><small>Post Code</small></b></td>
<td><b><small>Telephone</small></b></td>
<td><b><small>Mobile</small></b></td>
<td><b><small>Fax</small></b></td>
<td><b><small>Last Contact</small></b></td>
<td><b><small>Contact Again</small></b></td>
<td><b><small>Consultation Panel</small></b></td>
<td><b><small>Primary Contact</small></b></td>
<td><b><small>Graduate Jobs</small></b></td>
<td><b><small>MSC Projects</small></b></td>
<td><b><small>UG Projects</small></b></td>
<td><b><small>Professional Dev</small></b></td>
<td><b><small>BCS Mem.</small></b></td>
<td><b><small>BCS PDS</small></b></td>
<td><b><small>Teaching</small></b></td>
<td><b><small>Academic Consultancy</small></b></td>";
while ($row = mysql_fetch_object($sql))
{($color==$color2)? $color = $color1 : $color = $color2;
echo "<tr bgcolor=\"$color\"><td>".$count . '</td>
<td>'.'<a href="editpeople.html?person_id='.$row->person_id. '">edit</a></td>
<td>'.$row->salutation .'</td>
<td>'.'<a href=mailto:'.$row->email.'>'.$row->firstname .'</a></td>
<td>'.'<a href=mailto:'.$row->email.'>'.$row->surname .'</a></td>
<td>'.'<a href=http://'.$row->web_url.'>'.$row->organisation . '</a></td>
<td>'.$row->role.'</td>
<td>'.$row->address1 .'</td>
<td>'.$row->address2 .'</td>
<td>'.$row->city .'</td>
<td>'.$row->postcode .'</td>
<td>'.$row->telephone .'</td>
<td>'.$row->mobile .'</td>
<td>'.$row->fax .'</td>
<td>'.$row->dateoflastcontact.'</td>
<td>'.$row->datecontactagain.'</td>
<td>'.$row->consultation_panel_member.'</td>
<td>'.'<a href=mailto:'.$row->primarycontactemail.'>'.$row->primary_contact.'</td>
<td>'.$row->advertising_grad_jobs.'</td>
<td>'.$row->offer_mscproject .'</td>
<td>'.$row->offer_ugproject.'</td>
<td>'.$row->professional_devactivitites .'</td>
<td>'.$row->bcs_membership .'</td>
<td>'.$row->bcs_pds .'</td>
<td>'.$row->teaching_courses .'</td>
<td>'.$row->academic_consultancy .'<td>';
$count += 1;
}
echo "</table>";