473,811 Members | 3,314 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving formatting in variables

Jim
Hi All,
I would appreciate a pointer on this problem, if you please.

I am writing a 'tell a friend' page for my www site. Essentially, the
user opens the page, fills out a form, click submit, the text of the
email that will be sent to their friend is presented on screen. If they
like it, they press send, and an email is sent to their friend.

The main body of the email is in a variable, which contains paragraph
formatting etc. The problem I am having is that the paragraph
formatting is not transmitted to the html page that they review, and
that page looks messy. Of course, I tried putting in html formatting in
the variable, but then this literally appears in the email. Does anyone
know a way of solving this problem?

Ta in advance,
Jim

Oct 2 '06 #1
2 1133
Message-ID: <11************ *********@m73g2 000cwd.googlegr oups.comfrom
Jim contained the following:
>Does anyone
know a way of solving this problem?
1. Use nl2br() on the output to the screen.
or
2. Use <pre></pre>

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Oct 2 '06 #2
Jim
Hi Geoff,

Thanks, much appreciated,

Jim

Geoff Berrow wrote:
Message-ID: <11************ *********@m73g2 000cwd.googlegr oups.comfrom
Jim contained the following:
Does anyone
know a way of solving this problem?

1. Use nl2br() on the output to the screen.
or
2. Use <pre></pre>

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Oct 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2803
by: Filippo Pandiani | last post by:
SCENARIO ======================================= I have a Grid and I want to save the values on an XML. Let me say that I am NOT using DataSet to load valus on my grid. PROBLEM ======================================= When I am saving a Grid to XML I get the following exception: "Token StartElement in state Epilog would result in an invalid XML document"
0
1432
by: soberhi | last post by:
I am new to Access (and Access programming) so kindly be gentle. I did try to search around before asking this question. I am simplifying my problem in the hopes that this scaled down version will mirror my current situation. Scenario: I have 5 clients in my customer table. My goal:
1
1344
by: David Johnston | last post by:
I am converting to the .NET platform and I am starting with C#. Just for exercise I'm writing a text editor and I am having some problems with saving files. I am using a single document interface system. I am just working with plain text now but I was wondering what differences I would have to make to save between .txt, .rtf, or even .doc if possible. Thanks for any help you could give or examples you could point me to . Thanks again.
4
4264
by: John Kandell | last post by:
Hi, Would someone be able to shed some light on what is the cost of saving a DataTable to session vs saving a custom object of the same data. For example, let's say I had a DataTable with 1000 records and each record had 10 columns, how much extra cost is involved in saving that vs, a custom object with 10 get/set properties in a ArrayList holding 1000 instances of the object with the same data?
0
1169
by: Stu | last post by:
Hi, I want to be able to come up with some way of navigating around a system that allows me to save certain screen info (Say combo box setting) so that when returning to the screen from a link on another screen it remembers the screen settings as they were. Using javascript can obviously be messy as I found Session variables could be overkill since different screens have potentially different
10
3167
by: Coleen | last post by:
Hi all :-) I have a weird formatting problem with an HTML table that I am populating using VB.Net and HTML. Here is the snippet of code for the cell I'm trying to format: Dim ld_tot_pet_clean_fee_calc As Double ld_tot_pet_clean_fee_calc = li_net_total_calc * 0.0075 ld_tot_pet_clean_fee = lo_misc_func.FormatMC(ld_tot_pet_clean_fee_calc, "D") Session("tot_pet_clean_fee") = lo_misc_func.FormatMC(ld_tot_pet_clean_fee, "D")...
2
1414
by: Mark | last post by:
I am running into a weird problem. I am using the following code: String.Format("{0:0}:{1:00}:{2:00}", Hours.ToString, Minutes.ToString, Seconds.ToString) Just say seconds is set to 1, it should return a string that displays 0:00:01, but it isn't display that, instead I get 0:0:1. Can anyone tell me why the format function isn't displaying both digit placeholders? 00 as a format should return 01, not 1. Any ideas?
15
3767
by: Marcus Kwok | last post by:
How do you save the formatting options for a stream? In the program below, notice that when I define my operator<<() for the custom type, it permanently changes the output format of the stream: #include <iostream> #include <iomanip> struct Data { double d; };
26
4607
by: geolev | last post by:
I'm trying to understand the effects of the Daylight Saving Time rule changes for 2007 in the US. Can anyone tell me how Javascript knows when to apply Daylight Saving Time in the following script? d1 = new Date(2006, 03, 01, 23, 00); d2 = new Date(2006, 03, 02, 04, 00); // Reports "This is ok: The answere should be 4. It is 4". alert("This is ok: The answer should be 4. It is " + (((d2.valueOf() - d1.valueOf())/1000)/60)/60);
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5556
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5697
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4342
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3871
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.