Solved

Scrollable PHP Text Box output Table

Posted on 2011-03-15
6
312 Views
Last Modified: 2012-05-11
Hello Experts,

Im a little confused as how i output data into a scrollable text box, it is set up in the database as 255 varchar, but dont know how to make the table scrollable for "last spoken to" and "notes"

Please could you assist me,

Output of table is attached in code.

thanks
echo"<table>";
   echo "<tr><td>Company:</td><td>".$row['customer_name']."</td></tr>";
    echo "<tr><td>Account Number:</td><td><a href=\"account.php?val=".$row['account_number']."\">".$row['account_number']."</a></td></tr>";
	 echo "<tr><td>Contact Name:</td><td>".$row['contact_name']."</td></tr>";
	 echo "<tr><td>Telephone Number:</td><td>".$row['telephone_number']."</td></tr>";
	 echo "<tr><td>Fax:</td><td>".$row['fax']."</td></tr>";
	 echo "<tr><td>Contact Mob Number:</td><td>".$row['contact_mobile']."</td></tr>";
	 echo "<tr><td>Address:</td><td>".$row['full_address']."</td></tr>";
	 echo "<tr><td>Network:</td><td>".$row['network']."</td></tr>";
	 echo "<tr><td>Last Spoke To:</td><td>".$row['last_spoke_to']."</td></tr>";
	 echo "<tr><td>Notes:</td><td>".$row['notes']."</td></tr>";
	 echo "<tr><td>Kit Fund Level:</td><td>".$row['kit_fund_level']."</td></tr>";
   echo"</table>";

Open in new window

0
Comment
Question by:NeoAshura
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 5

Expert Comment

by:meb_santoso
ID: 35137924
Did you mean something like this : (see screenshot)

images

Then it's not really a PHP-issue, it's CSS/HTML stuff :-)

Your script:
echo "<tr><td>Last Spoke To:</td><td>".$row['last_spoke_to']."</td></tr>";

Open in new window


Change it to:
echo "<tr><td>Last Spoke To:</td><td>"
[b]<div style="width: [u]190px[/u];height: [u]250px[/u];overflow:auto;">
[/b].$row['last_spoke_to'].[b]</div>[/b]"</td></tr>";

Open in new window


Adjust the width and height accordingly.
0
 
LVL 5

Expert Comment

by:meb_santoso
ID: 35137933
sorry, I put the "new" version betweet code-tags.

It should be like this:

echo "<tr><td>Last Spoke To:</td><td>"
<div style="width: 190px;height: 250px;overflow:auto;">
.$row['last_spoke_to'].</div>"</td></tr>";

0
 
LVL 6

Author Comment

by:NeoAshura
ID: 35138004
i dont believe you can put div tags inside of php..

any other ideas?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Accepted Solution

by:
meb_santoso earned 500 total points
ID: 35138115
correction:
echo "<tr><td>Last Spoke To:</td><td>
<div style=\"width: 190px;height: 250px;overflow:auto;\">"
.$row['last_spoke_to']."</div></td></tr>";
0
 
LVL 6

Author Comment

by:NeoAshura
ID: 35138162
cheers buddy
0
 
LVL 5

Expert Comment

by:meb_santoso
ID: 35138242
:-)
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question