|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 ![]() |
|
#3
|
|||
|
|||
|
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 !! ![]() |
|
#4
|
|||
|
|||
|
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...
|
|
#5
|
|||
|
|||
|
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 ... |
|
#6
|
|||
|
|||
|
I recently found an excellent MySQL 2 Excel script (it can also make Word files), here's the link:
MySQL2Excel or Word |
|
#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 |
|
#8
|
|||
|
|||
|
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"; |
|
#9
|
|||
|
|||
|
Re: print output of <textarea> to screen
Quote:
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. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > printing text |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|