[PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
Perhaps I don't understand the use of 'htmlentities' too well, but I would like newlines to be retained/inserted into a db, and then if displayed, to produce a new line from a textarea. However, I want the possibility of dangerous html excluded (hence the use of 'htmlentities'). Is there some

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
Perhaps I don't understand the use of 'htmlentities' too well, but I would like newlines to be retained/inserted into a db, and then if displayed, to produce a new line from a textarea. However, I want the possibility of dangerous html excluded (hence the use of 'htmlentities'). Is there

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 03:30 pm, John W. Holmes wrote: Perhaps I don't understand the use of 'htmlentities' too well, but I would like newlines to be retained/inserted into a db, and then if displayed, to produce a new line from a textarea. However, I want the possibility of

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
: Saturday, September 28, 2002 6:25 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Htmlentities and Newlines? On Saturday 28 September 2002 03:30 pm, John W. Holmes wrote: Perhaps I don't understand the use of 'htmlentities' too well, but I would like newlines to be retained

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
PROTECTED] Subject: Re: [PHP] Htmlentities and Newlines? On Saturday 28 September 2002 03:30 pm, John W. Holmes wrote: Perhaps I don't understand the use of 'htmlentities' too well, but I would like newlines to be retained/inserted into a db, and then if displayed

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
Sorry about the ambiguity. What I'm trying to accomplish is close to what you describe. However, before anything goes into the db (ie html chars, bad commands, or anything from Mr.Hacker), I verify it. Someone suggested, way back when I first started with textarea, to use 'htmlentities' to

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Sascha Cunz
Hi John, Sorry about the ambiguity. What I'm trying to accomplish is close to what you describe. However, before anything goes into the db (ie html chars, bad commands, or anything from Mr.Hacker), I verify it. Someone suggested, way back when I first started with textarea, to use

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 07:55 pm, John W. Holmes wrote: Sorry about the ambiguity. What I'm trying to accomplish is close to what you describe. However, before anything goes into the db (ie html chars, bad commands, or anything from Mr.Hacker), I verify it. Someone suggested,

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
- From: Sascha Cunz [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 28, 2002 8:19 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php- [EMAIL PROTECTED] Subject: Re: [PHP] Htmlentities and Newlines? Hi John, Sorry about the ambiguity. What I'm trying to accomplish is close to what

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Sascha Cunz
?php /* db access using postgresql - each row is displayed */ ... trtd{$myrow['request']}/td/tr ... ? Now unless I can do something like: trtd'nl2br({$myrow['request']}'/td/tr Try something like echo 'trtd'.nl2br($myrow['request'].'/td/tr'; Regards Sascha -- PHP General Mailing

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 08:19 pm, Sascha Cunz wrote: Hi John, Sorry about the ambiguity. What I'm trying to accomplish is close to what you describe. However, before anything goes into the db (ie html chars, bad commands, or anything from Mr.Hacker), I verify it. Someone

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Sascha Cunz
Yeah, good catch on the addslash/magic_quote. Also, FYI: PHP will only allow you to do one query per mysql_query(). So you can't try to end a quote and then send another query. Don't know if this is the case for all database functions, or what... Does PHP this? Such behaviour would be

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
-Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 28, 2002 8:34 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Htmlentities and Newlines? On Saturday 28 September 2002 07:55 pm, John W. Holmes wrote: Sorry about

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Rasmus Lerdorf
Yeah, good catch on the addslash/magic_quote. Also, FYI: PHP will only allow you to do one query per mysql_query(). So you can't try to end a quote and then send another query. Don't know if this is the case for all database functions, or what... Does PHP this? Such behaviour would be

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 08:32 pm, John W. Holmes wrote: -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 28, 2002 8:34 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Htmlentities and Newlines? On Saturday 28

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
Short question: following your advice, what would the data look like in the db if I typed in: Hi Sascha. Next line is doubled. Double. How would that appear iun the db? In mine, it looks exactly like I typed it above (using 1 2 with magic_quotes=on). It depends

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 08:42 pm, John W. Holmes wrote: Short question: following your advice, what would the data look like in the db if I typed in: Hi Sascha. Next line is doubled. Double. How would that appear iun the db? In mine, it looks exactly like

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Sascha Cunz
Does PHP do what? By default the MySQL query function can only take one query at a time. There is nothing strange about this. The command-line mysql tool can take multiple queries separated by semi-colons, but that is something that is implemented in that command-line tool. It is not done

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
-Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 28, 2002 9:00 PM To: [EMAIL PROTECTED]; 'Sascha Cunz'; [EMAIL PROTECTED] Subject: Re: [PHP] Htmlentities and Newlines? On Saturday 28 September 2002 08:42 pm, John W. Holmes wrote: Short

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 08:59 pm, John W. Holmes wrote: -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 28, 2002 9:00 PM To: [EMAIL PROTECTED]; 'Sascha Cunz'; [EMAIL PROTECTED] Subject: Re: [PHP] Htmlentities and Newlines

RE: [PHP] Htmlentities and Newlines?

2002-09-28 Thread John W. Holmes
-Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 28, 2002 9:14 PM To: [EMAIL PROTECTED]; 'Sascha Cunz'; [EMAIL PROTECTED] Subject: Re: [PHP] Htmlentities and Newlines? On Saturday 28 September 2002 08:59 pm, John W. Holmes wrote

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Andre Dubuc
On Saturday 28 September 2002 09:13 pm, John W. Holmes wrote: -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 28, 2002 9:14 PM To: [EMAIL PROTECTED]; 'Sascha Cunz'; [EMAIL PROTECTED] Subject: Re: [PHP] Htmlentities and Newlines