General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old April 10th, 2002, 07:17 AM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 81 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 31 sec
Reputation Power: 7
Cool printing text

Hey everyone,

Hope you guys enlighten me on this matter ! . Thats outputing/printing text messages.
I am using form element < textarea> to get some long messages from user where later this text is printed in other page. But the printed text are not arranged nicely. How should I make the text output text looks nice and arranged ?

zzzzzzzzzzzzzzzzzz

thanks
__________________
Rathaur
======================
Knowledge is Power

Reply With Quote
  #2  
Old April 10th, 2002, 08:09 AM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
hi rathur,
sure i can help. when you say print do you mean to the printer or to the screen? if to the printer i take it you'd like to format your code as bold, line seperated, etc....if not you'd mean to the screen...please exand on what you mean then i can help you out

Reply With Quote
  #3  
Old April 10th, 2002, 11:07 AM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 81 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 31 sec
Reputation Power: 7
sorry ....
a) I mean printing it to the screen

b) another question:

I have a file which contains data from mysql . How can I convert
it to .xls file ?


Thanks for your help !!

Reply With Quote
  #4  
Old April 10th, 2002, 06:05 PM
Reg77n Reg77n is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 16 Reg77n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What kind of formatting do you want? There are alot of ways to format code, you need to be more descriptive. As for converting MySQL to XLS, just get your mysql rows as comma seperated values and open them with Excel, it will format them automatically for your or you can decide how you want them formatedd...

Reply With Quote
  #5  
Old April 11th, 2002, 12:19 AM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 81 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 31 sec
Reputation Power: 7
for the second question, what I meant was ..the file is a resultant of some mysql queries. I read from mysql and writes to this data file.

But to view it, when the user click on the link which points to that data file, then that file should be opened in xls .

I am thinking of using header -content type ...

Reply With Quote
  #6  
Old April 11th, 2002, 03:34 AM
partyganger partyganger is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Limmen
Posts: 16 partyganger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I recently found an excellent MySQL 2 Excel script (it can also make Word files), here's the link:

MySQL2Excel or Word

Reply With Quote
  #7  
Old April 11th, 2002, 09:14 PM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 81 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 31 sec
Reputation Power: 7
Guys ... I am still waiting for my first question ... how should i format output to print on websites ... meaning the input messages/text are from form element textarea and i am storing this in a DB . Later it will be retrieved and printed on different page.

And Mr. Modertor, are you guys using any webportals to implement this site ? If, which one ? hope you dont mind shairng the secret with me ..


thanks

Reply With Quote
  #8  
Old April 11th, 2002, 11:56 PM
billsanders billsanders is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Oklahoma, USA
Posts: 13 billsanders User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to billsanders
print output of <textarea> to screen

I'm not sure I understand your question. If you are asking for the HTML code that will make it look good, consider any of the following:

<p> **output goes here** </p> or
<div> **output goes here** </div> or
<blockquote> **output goes here** </blockquote>

or a variation of the above:

<p style="color:red"> **output goes here** </p> or
<div style="width:250px"> **output goes here** </div> or
<blockquote style="margin:50px"> **output goes here** </blockquote>

So, if your output is stored in a variable ($text_out), you could code:

echo "<div style=\"width:250px\">$text_out</div>\n";

Reply With Quote
  #9  
Old April 12th, 2002, 01:16 AM
partyganger partyganger is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Limmen
Posts: 16 partyganger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: print output of <textarea> to screen

Quote:
Originally posted by billsanders
I'm not sure I understand your question. If you are asking for the HTML code that will make it look good, consider any of the following:

<p> **output goes here** </p> or
<div> **output goes here** </div> or
<blockquote> **output goes here** </blockquote>

or a variation of the above:

<p style="color:red"> **output goes here** </p> or
<div style="width:250px"> **output goes here** </div> or
<blockquote style="margin:50px"> **output goes here** </blockquote>

So, if your output is stored in a variable ($text_out), you could code:

echo "<div style=\"width:250px\">$text_out</div>\n";


Or even better (or at least, it's more manageable in tools like HomeSite, because the variables get a different color there.. ):
echo "<div style=\"width:250px\">".$text_out."</div>\n";

Last edited by partyganger : April 12th, 2002 at 02:51 AM.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > printing text


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway