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:
  #1  
Old April 10th, 2002, 08:17 AM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 17
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, 09:09 AM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 588 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
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, 12:07 PM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 17
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, 07:05 PM
Reg77n Reg77n is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 15 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, 01:19 AM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 17
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, 04:34 AM
partyganger partyganger is offline
Registered User
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, 10:14 PM
rathaur rathaur is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Malaysia
Posts: 82 rathaur User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 57 sec
Reputation Power: 17
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 12th, 2002, 12:56 AM
billsanders billsanders is offline
Registered User
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, 02:16 AM
partyganger partyganger is offline
Registered User
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 03:51 AM.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > printing text


Developer Shed Advertisers and Affiliates


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

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


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap