?
Solved

Scrollable PHP Text Box output Table

Posted on 2011-03-15
6
Medium Priority
?
314 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
7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

 
LVL 5

Accepted Solution

by:
meb_santoso earned 2000 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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

741 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