Solved

Scrollable PHP Text Box output Table

Posted on 2011-03-15
6
310 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
Industry Leaders: 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

735 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