Re: [PHP-DB] textarea value assignment

2006-10-04 Thread Bradley Stahl

If anyone is interested in some VERY good webhosting that has support for
PHP and MySQL, please take a look at the following link:

http://www.sturdyhosting.com/idevaffiliate/idevaffiliate.php?id=100

They offer domain names for $8.95 and also webhositng solutions for as low
as $2.95 per month.


I hope that some of you are interested and can join the greatest webhosting
company in the world!


On 10/4/06, Stut <[EMAIL PROTECTED]> wrote:


Brad Bonkoski wrote:
> [EMAIL PROTECTED] wrote:
>> Hello
>> how I could assign a textarea with a variable value?
>> Although I tried to achieve an allocation like a normal > it does not work so I have no success with textarea.
>>
>> The code looks like following fragment.
>>
>> $problem_val = mysqlclean($_SESSION, "problem_eb", 500, $connection);
>>
>> > cols="1" rows="1" name="problem_eb" value="> $problem_val?>">
>>
>>
>> Best regards, Joerg Kuehne
>>
>>
> There is no value attribute of textarea...to put text in there, you
> place it between the  tags.
> i.e.
>
>  cols="1" rows="1" name="problem_eb" > ?>

Also worth mentioning that you may run into problems if you don't use
htmlentities on $problem_val, like so...



-Stut

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] textarea value assignment

2006-10-04 Thread Stut

Brad Bonkoski wrote:

[EMAIL PROTECTED] wrote:

Hello
how I could assign a textarea with a variable value?
Although I tried to achieve an allocation like a normal it does not work so I have no success with textarea.
 
The code looks like following fragment.


$problem_val = mysqlclean($_SESSION, "problem_eb", 500, $connection);

cols="1" rows="1" name="problem_eb" value="$problem_val?>">



Best regards, Joerg Kuehne

  
There is no value attribute of textarea...to put text in there, you 
place it between the  tags.

i.e.

cols="1" rows="1" name="problem_eb" >?>


Also worth mentioning that you may run into problems if you don't use 
htmlentities on $problem_val, like so...


cols="1" rows="1" name="problem_eb" >htmlentities($problem_val); ?>


-Stut

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] textarea value assignment

2006-10-04 Thread Brad Bonkoski

[EMAIL PROTECTED] wrote:
Hello 


how I could assign a textarea with a variable value?
Although I tried to achieve an allocation like a 
normal  
The code looks like following fragment.


$problem_val = mysqlclean($_SESSION, "problem_eb", 500, $connection);

cols="1" rows="1" name="problem_eb" value="">



Best regards, Joerg Kuehne

  
There is no value attribute of textarea...to put text in there, you 
place it between the  tags.

i.e.

cols="1" rows="1" name="problem_eb" >

-B

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] textarea data and printing

2003-03-13 Thread John W. Holmes
> We are accepting Detailed description of the item in
> .
> 
> Is there any function which can return full words without breaking the
> lines. The data is stored in a PostgreSQL database in varchar field.
> 
> item_detail_description varchar(200)
> 
> I am assuming that the user need not press the 'enter' key at the end
of
> each line. Hence by using the 'carriage return' code this function
> cannot be written. I was interested in knowing if any such function
> already exists.

I don't understand what you want. Perhaps you're looking for nl2br()?

www.php.net/nl2br

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Textarea, File Upload field setting values

2003-01-04 Thread Bill Lovett
For the textarea, print the value between the tags-- there is no value
attribute:



You cannot do this with file inputs.

-bill



Rajesh Fowkar wrote:

Hi,

I can write a code like :



Thus I can set the value of $txtfield1 and it is reflected in the above
textbox.

How can such thing be done with TextArea and File upload ?





The above stuff is not working. Is it possible to accomplish the above
stuff ? I need this since I am calling the same form on submit for
validation and hence will need the values of the above also to remain
intact in case of error in any other fields.

Thanks in advance.

Peace

--
Rajesh *  [EMAIL PROTECTED]  *  http://www.symonds.net/~rajesh/
Powered By : Debian GNU/Linux 3.0 (Woody) - [Kernel 2.4.18(ext3),Mutt 1.5.1i]
It's not the valleys in life I dread so much as the dips.
		-- Garfield





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] textarea!!

2002-11-08 Thread Snijders, Mark
check out the nl2br() function!!


good luck





-Original Message-
From: Siamak Sadeghianfar [mailto:siamak116@;hotmail.com]
Sent: vrijdag 8 november 2002 15:31
To: [EMAIL PROTECTED]
Subject: [PHP-DB] textarea!!


Hi
I've written a guestbook in php
user writes a message in a texarea and in the code I insert it in a table 
and then in showpage I sow it to him.before I insert the message into table 
, I use addslashes() and htmlspecialchars(). the prblem is that , when I 
retrieve the message from the table all sentences are after each other , and

there's no break that makes a bad appearance.
I mean for example someone write in the texarea as following :
--
Hi
how r u?
what happened there?!
--

when I show the message to him the appearance is this way :
--
Hi how r u? what happened there?!
--

what should I do to show him exactly how he wrote the message?

thanx

_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] textarea!!

2002-11-08 Thread Marco Tabini
You need to use nl2br

http://ca.php.net/manual/en/function.nl2br.php


Marco

-
php|architect -- The Monthly Magazine For PHP Professionals
Come visit us on the web at http://www.phparch.com!

On Fri, 2002-11-08 at 09:30, Siamak Sadeghianfar wrote:
> Hi
> I've written a guestbook in php
> user writes a message in a texarea and in the code I insert it in a table 
> and then in showpage I sow it to him.before I insert the message into table 
> , I use addslashes() and htmlspecialchars(). the prblem is that , when I 
> retrieve the message from the table all sentences are after each other , and 
> there's no break that makes a bad appearance.
> I mean for example someone write in the texarea as following :
> --
> Hi
> how r u?
> what happened there?!
> --
> 
> when I show the message to him the appearance is this way :
> --
> Hi how r u? what happened there?!
> --
> 
> what should I do to show him exactly how he wrote the message?
> 
> thanx
> 
> _
> The new MSN 8: advanced junk mail protection and 2 months FREE* 
> http://join.msn.com/?page=features/junkmail
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] TEXTAREA ...

2002-07-18 Thread Beau Lebens

do i understand the question correctly?

you are getting a "" when you are expecting a "" ?

if that's the case then the simple answer (and as Jason pointed out, this is
in the manual) is that it's the same thing, but with the " /" in it, it
becomes XHTML compliant.

As copied directly from the manual;
---
Note: Starting with PHP 4.0.5, nl2br() is now XHTML compliant. All versions
before 4.0.5 will return string with '' inserted before newlines instead
of ''. 
---

enjoy

and please don't under-estimate the quality of the manual
(www.php.net/manual/en/) because it, combined with some sample code from
around the place (and a bunch of spare time!) is really all you need to get
going :)

Beau

// -Original Message-
// From: José Moreira [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 18 July 2002 11:19 PM
// To: 'Martin Clifford'; Php-Db (Correio electrónico)
// Subject: RE: [PHP-DB] TEXTAREA ...
// 
// 
// good day/afternoon/night
// 
// why do i get this :
// 
//   $content = htmlentities($content);
// 
// when i insert this :
// 
//  $content = htmlentities($content);[new line]
// 
// using this :
// 
//  $thePost = 
// nl2br(addslashes(htmlspecialchars($HTTP_POST_VARS["POST"])));
// 
// when i want this :
// 
//$content = htmlentities($content);
// 
// and i sometimes get
// 
// 
// 
// 
// once again sorry for asking non-db questions
// 
// good work
// 
// 
// -Mensagem original-
// De: Martin Clifford [mailto:[EMAIL PROTECTED]]
// Enviada: quarta-feira, 17 de Julho de 2002 15:02
// Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
// Assunto: Re: [PHP-DB] TEXTAREA ...
// 
// 
// Yup.  So:
// 
// $content = nl2br(htmlentities(stripslashes($content)));
// // Good for echo'ing HTML into the page
// 
// $content = nl2br($content);
// // Good for showing $content with HTML formatting
// 
// Martin Clifford
// Homepage: http://www.completesource.net
// Developer's Forums: http://www.completesource.net/forums/
// 
// 
// >>> "Martin Adler" <[EMAIL PROTECTED]> 07/17/02 09:48AM >>>
// That's right but if the variable is initialised by the form 
// and you want to
// write the variable in to your html-document it's better to write this
// 
// $content = nl2br(htmlentities(stripslashes($content)));
// 
// - Original Message -
// From: "Martin Clifford" <[EMAIL PROTECTED]>
// To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
// Sent: Wednesday, July 17, 2002 3:15 PM
// Subject: Re: [PHP-DB] TEXTAREA ...
// 
// 
// $content = nl2br($content);
// 
// That will convert all newline characters into  tags.
// 
// HTH
// 
// Martin Clifford
// Homepage: http://www.completesource.net
// Developer's Forums: http://www.completesource.net/forums/
// 
// 
// >>> José Moreira <[EMAIL PROTECTED]> 07/17/02 09:15AM >>>
// hello ... im sorry to bother with a non-db question but i 
// searched for this
// and got 0 record :P
// 
// its all about the wrappig in textareas:
// 
// how can i convert the end of line/ line breaks ['enter' 
// keys] that the user
// hits while
// filling a textarea so that when i display the record content 
// the text does
// break where the user intended ???
// 
// ex.:
// 
// bla blah blah
//  bla blah blah
// 
// if i echo() this textarea value i will apear in a single 
// line even if the
// user pressed enter 2  break the line
// 
// 
// 
// 
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
// 
// 
// 
// 
// 
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
// 
// 
// 
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
// 
// 
// 
// -- 
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
// 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] TEXTAREA ...

2002-07-18 Thread Russ

Jose:

When you have a problem such as this. It's best to reduce or limit the
possible problems that could be causing it.

It looks as though you want to basically format your database content to
preserve new lines and the like.

If I were you I'd start by just using nl2br(), then when you use
htmlspecialchars() it has a similar function when it comes across new
lines. (as well as reformatting HTML entities)

Check also whether you need to use addslashes() as PHP4.2.1 has magic
quotes turned off: magic_quotes_gpc off (Check your phpinfo.php file or
write one yourself.)

Good luck - and you really don't wanna know what "RTFM" means but you
could find out at:
http://www.astro.umd.edu/~marshall/abbrev.html#R

Russ


-Original Message-
From: José Moreira [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 11:19 PM
To: 'Martin Clifford'; Php-Db (Correio electrónico)
Subject: RE: [PHP-DB] TEXTAREA ...


good day/afternoon/night

why do i get this :

  $content = htmlentities($content);

when i insert this :

$content = htmlentities($content);[new line]

using this :

$thePost =
nl2br(addslashes(htmlspecialchars($HTTP_POST_VARS["POST"])));

when i want this :

  $content = htmlentities($content);

and i sometimes get




once again sorry for asking non-db questions

good work


-Mensagem original-
De: Martin Clifford [mailto:[EMAIL PROTECTED]]
Enviada: quarta-feira, 17 de Julho de 2002 15:02
Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: Re: [PHP-DB] TEXTAREA ...


Yup.  So:

$content = nl2br(htmlentities(stripslashes($content)));
// Good for echo'ing HTML into the page

$content = nl2br($content);
// Good for showing $content with HTML formatting

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> "Martin Adler" <[EMAIL PROTECTED]> 07/17/02 09:48AM >>>
That's right but if the variable is initialised by the form and you want
to
write the variable in to your html-document it's better to write this

$content = nl2br(htmlentities(stripslashes($content)));

- Original Message -
From: "Martin Clifford" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 3:15 PM
Subject: Re: [PHP-DB] TEXTAREA ...


$content = nl2br($content);

That will convert all newline characters into  tags.

HTH

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> José Moreira <[EMAIL PROTECTED]> 07/17/02 09:15AM >>>
hello ... im sorry to bother with a non-db question but i searched for
this
and got 0 record :P

its all about the wrappig in textareas:

how can i convert the end of line/ line breaks ['enter' keys] that the
user
hits while
filling a textarea so that when i display the record content the text
does
break where the user intended ???

ex.:

bla blah blah
 bla blah blah

if i echo() this textarea value i will apear in a single line even if
the
user pressed enter 2  break the line




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] TEXTAREA ...

2002-07-18 Thread Woolsey, Fred

Guys,

My instincts tell me to keep out of this spat, but what the hey...

1) Perhaps it is wise not to make gratuitous, patronizing replies, such as
"RTFM," to requests for information.  Better to let the question pass and
keep your thoughts to yourself.

2) Perhaps it is wise not to use words like "_ass_" and "_prick_" in a
public mailing list putatively devoted to the pusuit of knowledge.

You can figure out which point applies to which combatant.

/*
Cryptic signatures are for the self-important;
Cuss words are for the linguistically challenged;
To the best of your ability, be at peace with all men (and women).
*/

Fred Woolsey

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 2:27 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] TEXTAREA ...


On Friday 19 July 2002 01:44, Hillensbeck, Preston wrote:
> Well have you thought about that maybe someone went looking for the
> documentation and couldn't find what they were looking for?  

Did the OP tell you that? Let him/her speak for himself/herself.

> Maybe if you
> get your _head_ out of your _ass_ and stop being a prick, maybe you would
> see that.

And you're not helping the OP by hurling insults.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
If there are epigrams, there must be meta-epigrams.
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] TEXTAREA ...

2002-07-18 Thread Jason Wong

On Friday 19 July 2002 01:44, Hillensbeck, Preston wrote:
> Well have you thought about that maybe someone went looking for the
> documentation and couldn't find what they were looking for?  

Did the OP tell you that? Let him/her speak for himself/herself.

> Maybe if you
> get your _head_ out of your _ass_ and stop being a prick, maybe you would
> see that.

And you're not helping the OP by hurling insults.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
If there are epigrams, there must be meta-epigrams.
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] TEXTAREA ...

2002-07-18 Thread Hillensbeck, Preston

Don't tell me what to do, I'll do as I please thank you very little.

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 12:36 PM
To: Hillensbeck, Preston
Subject: Re: [PHP-DB] TEXTAREA ...


Please do not include me in any reply. I'm subscribed to the list and
getting 
one copy of any message is enough for me.

On Friday 19 July 2002 00:09, you wrote:
> Why even bother replying if that is all you have to say?

thanks
-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
We have seen the light at the end of the tunnel, and it's out.
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] TEXTAREA ...

2002-07-18 Thread Hillensbeck, Preston

Well have you thought about that maybe someone went looking for the
documentation and couldn't find what they were looking for?  Maybe if you
get your _head_ out of your _ass_ and stop being a prick, maybe you would
see that.

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 12:33 PM
To: Hillensbeck, Preston
Subject: Re: [PHP-DB] TEXTAREA ...


On Friday 19 July 2002 00:09, Hillensbeck, Preston wrote:
> Why even bother replying if that is all you have to say?

Because that is all I _need_ to say.

Because the manual fully explains the workings of the function that the OP
is 
using.

Because it's pointless for me copy and paste what the manual has to say into

my reply.

Because people should learn to read the documentation.

Because I've got nothing better to do.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
... I don't like FRANK SINATRA or his CHILDREN.
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] TEXTAREA ...

2002-07-18 Thread Hillensbeck, Preston

Why even bother replying if that is all you have to say?

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 10:24 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] TEXTAREA ...


On Thursday 18 July 2002 23:18, José Moreira wrote:

> using this :
>
>   $thePost =
nl2br(addslashes(htmlspecialchars($HTTP_POST_VARS["POST"])));
>
> when i want this :
>
> $content = htmlentities($content);
>
> and i sometimes get
>
> 

RTFM

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
I guess it was all a DREAM ... or an episode of HAWAII FIVE-O ...
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] TEXTAREA ...

2002-07-18 Thread José Moreira


RTFM

???




-Mensagem original-
De: Jason Wong [mailto:[EMAIL PROTECTED]]
Enviada: quinta-feira, 18 de Julho de 2002 16:24
Para: [EMAIL PROTECTED]
Assunto: Re: [PHP-DB] TEXTAREA ...


On Thursday 18 July 2002 23:18, José Moreira wrote:

> using this :
>
>   $thePost = nl2br(addslashes(htmlspecialchars($HTTP_POST_VARS["POST"])));
>
> when i want this :
>
> $content = htmlentities($content);
>
> and i sometimes get
>
> 

RTFM

--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
I guess it was all a DREAM ... or an episode of HAWAII FIVE-O ...
*/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] TEXTAREA ...

2002-07-18 Thread Jason Wong

On Thursday 18 July 2002 23:18, José Moreira wrote:

> using this :
>
>   $thePost = nl2br(addslashes(htmlspecialchars($HTTP_POST_VARS["POST"])));
>
> when i want this :
>
> $content = htmlentities($content);
>
> and i sometimes get
>
> 

RTFM

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
I guess it was all a DREAM ... or an episode of HAWAII FIVE-O ...
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] TEXTAREA ...

2002-07-18 Thread José Moreira

good day/afternoon/night

why do i get this :

  $content = htmlentities($content);

when i insert this :

$content = htmlentities($content);[new line]

using this :

$thePost = nl2br(addslashes(htmlspecialchars($HTTP_POST_VARS["POST"])));

when i want this :

  $content = htmlentities($content);

and i sometimes get




once again sorry for asking non-db questions

good work


-Mensagem original-
De: Martin Clifford [mailto:[EMAIL PROTECTED]]
Enviada: quarta-feira, 17 de Julho de 2002 15:02
Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: Re: [PHP-DB] TEXTAREA ...


Yup.  So:

$content = nl2br(htmlentities(stripslashes($content)));
// Good for echo'ing HTML into the page

$content = nl2br($content);
// Good for showing $content with HTML formatting

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> "Martin Adler" <[EMAIL PROTECTED]> 07/17/02 09:48AM >>>
That's right but if the variable is initialised by the form and you want to
write the variable in to your html-document it's better to write this

$content = nl2br(htmlentities(stripslashes($content)));

- Original Message -
From: "Martin Clifford" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 3:15 PM
Subject: Re: [PHP-DB] TEXTAREA ...


$content = nl2br($content);

That will convert all newline characters into  tags.

HTH

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> José Moreira <[EMAIL PROTECTED]> 07/17/02 09:15AM >>>
hello ... im sorry to bother with a non-db question but i searched for this
and got 0 record :P

its all about the wrappig in textareas:

how can i convert the end of line/ line breaks ['enter' keys] that the user
hits while
filling a textarea so that when i display the record content the text does
break where the user intended ???

ex.:

bla blah blah
 bla blah blah

if i echo() this textarea value i will apear in a single line even if the
user pressed enter 2  break the line




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] TEXTAREA ...

2002-07-17 Thread Martin Clifford

Yup.  So:

$content = nl2br(htmlentities(stripslashes($content)));
// Good for echo'ing HTML into the page

$content = nl2br($content);
// Good for showing $content with HTML formatting

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> "Martin Adler" <[EMAIL PROTECTED]> 07/17/02 09:48AM >>>
That's right but if the variable is initialised by the form and you want to
write the variable in to your html-document it's better to write this

$content = nl2br(htmlentities(stripslashes($content)));

- Original Message -
From: "Martin Clifford" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 3:15 PM
Subject: Re: [PHP-DB] TEXTAREA ...


$content = nl2br($content);

That will convert all newline characters into  tags.

HTH

Martin Clifford
Homepage: http://www.completesource.net 
Developer's Forums: http://www.completesource.net/forums/ 


>>> José Moreira <[EMAIL PROTECTED]> 07/17/02 09:15AM >>>
hello ... im sorry to bother with a non-db question but i searched for this
and got 0 record :P

its all about the wrappig in textareas:

how can i convert the end of line/ line breaks ['enter' keys] that the user
hits while
filling a textarea so that when i display the record content the text does
break where the user intended ???

ex.:

bla blah blah
 bla blah blah

if i echo() this textarea value i will apear in a single line even if the
user pressed enter 2  break the line




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] TEXTAREA ...

2002-07-17 Thread Martin Adler

That's right but if the variable is initialised by the form and you want to
write the variable in to your html-document it's better to write this

$content = nl2br(htmlentities(stripslashes($content)));

- Original Message -
From: "Martin Clifford" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 3:15 PM
Subject: Re: [PHP-DB] TEXTAREA ...


$content = nl2br($content);

That will convert all newline characters into  tags.

HTH

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> José Moreira <[EMAIL PROTECTED]> 07/17/02 09:15AM >>>
hello ... im sorry to bother with a non-db question but i searched for this
and got 0 record :P

its all about the wrappig in textareas:

how can i convert the end of line/ line breaks ['enter' keys] that the user
hits while
filling a textarea so that when i display the record content the text does
break where the user intended ???

ex.:

bla blah blah
 bla blah blah

if i echo() this textarea value i will apear in a single line even if the
user pressed enter 2  break the line




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] TEXTAREA ...

2002-07-17 Thread Martin Clifford

$content = nl2br($content);

That will convert all newline characters into  tags.

HTH

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


>>> José Moreira <[EMAIL PROTECTED]> 07/17/02 09:15AM >>>
hello ... im sorry to bother with a non-db question but i searched for this
and got 0 record :P

its all about the wrappig in textareas:

how can i convert the end of line/ line breaks ['enter' keys] that the user
hits while
filling a textarea so that when i display the record content the text does
break where the user intended ???

ex.:

bla blah blah
 bla blah blah

if i echo() this textarea value i will apear in a single line even if the
user pressed enter 2  break the line




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] textarea and mysql query

2002-03-18 Thread jas

John, that worked great.  Thanks again for your help, I am going to do a
tutorial on using textareas in order to edit contents of a database
considering i had a hell of a time trying to find one elsewhere.
Jas
"John Hughes" <[EMAIL PROTECTED]> wrote in message
003e01c1ceb2$a05f8680$[EMAIL PROTECTED]">news:003e01c1ceb2$a05f8680$[EMAIL PROTECTED]...
> "jas" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I need some help with a query to place the results within a text area...
> > here is the code and so far every time I try it out all that happens is
it
> > displays the textbox but not the results of the query.
> > 
> >  > $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> > cm_index",$dbh));
> > echo " > rows='8'> > value='save'>\n";
> > ?>
> >   
> > Any help would be great.
> > Jas
> >
>
>
> If the "wel_area" is a TEXT field in the database, why the array
treatment.
> I have a database that contains several TEXT fields that I can call up and
> edit.  To do that I bring the data into a textarea.
>
> Here's part of my code:
>
> The SQL query:
>
> $sql = "SELECT subj, body, info, fname, lname, title, city, other,
>   record_date, status, batch, modified_by
>   FROM $table_name
>   WHERE id = '$id'
>   ";
>
> The results are read into variables:
>
> while ($row = mysql_fetch_array($result)) {
>   $subj = $row['subj'];
>   $body = $row['body'];
>   $info = $row['info'];
>   $fname = $row['fname'];
>   $lname = $row['lname'];
>   $title = $row['title'];
>   $city = $row['city'];
>   $other = $row['other'];
>   $record_date = $row['record_date'];
>   $status = $row['status'];
>   $batch = $row['batch'];
>   $modified_by = $row['modified_by'];
>  } #end while
>
> In the body of the HTML section I have areas such as this:
>
> 
> ?>
>  
>
> This creates an editable TEXTAREA that can then be UPDATEd in the
database.
>
> John Hughes
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] textarea and mysql query

2002-03-18 Thread Shrock, Court

You problem lies in the html that you are outputting.

For normal html  tags, you use the "value" attribute to initialize
the default display.  For  tags, you do not use the "value"
attribute; instead, enclose what you want displayed between the openining
 tag and the closing  tag.  For example:


Please edit this textarea


> -Original Message-
> From: jas [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 17, 2002 10:54 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] textarea and mysql query
> 
> 
> I need some help with a query to place the results within a 
> text area...
> here is the code and so far every time I try it out all that 
> happens is it
> displays the textbox but not the results of the query.
>  action="index_confirm.php3 target="box">
>  $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> cm_index",$dbh));
> echo " cols='25'
> rows='8'> value='save'>\n";
> ?>
>   
> Any help would be great.
> Jas
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] textarea and mysql query

2002-03-18 Thread Jason Wong

On Monday 18 March 2002 15:09, jas wrote:
> Sorry, the connection is established already so that part works just fine.
> It is getting the results of said connection \ query to appear in a
> textarea vs. a text line.
> "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
>
> > On Monday 18 March 2002 14:53, jas wrote:
> > > I need some help with a query to place the results within a text
> > > area... here is the code and so far every time I try it out all that
> > > happens is
>
> it
>
> > > displays the textbox but not the results of the query.
> > >   > > $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> > > cm_index",$dbh));
> > > echo " > > rows='8'> > > value='save'>\n";
> > > ?>
> > >   



Text areas are specified as:

 Stuff which goes into text area


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Let's not complicate our relationship by trying to communicate with each 
other.
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] textarea and mysql query

2002-03-18 Thread John Hughes

"jas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I need some help with a query to place the results within a text area...
> here is the code and so far every time I try it out all that happens is it
> displays the textbox but not the results of the query.
> 
>  $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> cm_index",$dbh));
> echo " rows='8'> value='save'>\n";
> ?>
>   
> Any help would be great.
> Jas
>


If the "wel_area" is a TEXT field in the database, why the array treatment.
I have a database that contains several TEXT fields that I can call up and
edit.  To do that I bring the data into a textarea.

Here's part of my code:

The SQL query:

$sql = "SELECT subj, body, info, fname, lname, title, city, other,
  record_date, status, batch, modified_by
  FROM $table_name
  WHERE id = '$id'
  ";

The results are read into variables:

while ($row = mysql_fetch_array($result)) {
  $subj = $row['subj'];
  $body = $row['body'];
  $info = $row['info'];
  $fname = $row['fname'];
  $lname = $row['lname'];
  $title = $row['title'];
  $city = $row['city'];
  $other = $row['other'];
  $record_date = $row['record_date'];
  $status = $row['status'];
  $batch = $row['batch'];
  $modified_by = $row['modified_by'];
 } #end while

In the body of the HTML section I have areas such as this:


   
 

This creates an editable TEXTAREA that can then be UPDATEd in the database.

John Hughes



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] textarea and mysql query

2002-03-18 Thread jas

Yeah it is not multidimensional at all, a simple text blob is what should be
pulled into the textarea.  I am not trying to query multipled record fields
at all.  One field per textarea.  Do you know of a good tutorial on pulling
sql queries into textareas?  If you do please let me know as I have searched
php.net and other sites for a tutorial on textarea's but have not found any
nor is there any reference to such a problem in any of the php or mysql
books i have.
"Ray Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> What is the result of $record['wel_area'].  If this is a multidimensional
> array then you will need to access it differently...
>
> Example:
> echo $record[0][0]."\n";
>
> Try this is your text area and see if that comes out...
>
>
>
> Thank you,
>
> Ray Hunter
> Firmware Engineer
>
> ENTERASYS NETWORKS
>
>
> -Original Message-
> From: jas [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 18, 2002 12:07 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] textarea and mysql query
>
>
> Yeah that didn't work either... If I put the same value (
> value=\"{$record['wel_area']}\" ) on a text line it works just fine
however
> using the same value for a textarea doesnt give me any results nor does it
> give me an error message to go on, if there is a way to output the code to
> the screen like a dos echo command that would help out alot.  Thanks in
> advance, Jas "Ray Hunter" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Try this:
> >
> > 
> >  > $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> > cm_index",$dbh)); echo " > value='".$record['wel_area']."' cols='25'
> > rows='8'> > value='save'>\n"; ?>
> > 
> >
> > If not then let me know...
> >
> >
> > Thank you,
> >
> > Ray Hunter
> > Firmware Engineer
> >
> > ENTERASYS NETWORKS
> >
> >
> > -Original Message-
> > From: jas [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, March 17, 2002 11:54 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] textarea and mysql query
> >
> >
> > I need some help with a query to place the results within a text
> > area... here is the code and so far every time I try it out all that
> > happens is it displays the textbox but not the results of the query.
> >  name="wel_area"
> > method="post" action="index_confirm.php3 target="box">
> >  > $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> > cm_index",$dbh)); echo " > value='{$record['wel_area']}' cols='25' rows='8'> > type='submit' name='save' value='save'>\n"; ?>
> >   
> > Any help would be great.
> > Jas
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] textarea and mysql query

2002-03-18 Thread Hunter, Ray

What is the result of $record['wel_area'].  If this is a multidimensional
array then you will need to access it differently...

Example:
echo $record[0][0]."\n";

Try this is your text area and see if that comes out...



Thank you,

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: jas [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 18, 2002 12:07 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] textarea and mysql query


Yeah that didn't work either... If I put the same value (
value=\"{$record['wel_area']}\" ) on a text line it works just fine however
using the same value for a textarea doesnt give me any results nor does it
give me an error message to go on, if there is a way to output the code to
the screen like a dos echo command that would help out alot.  Thanks in
advance, Jas "Ray Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Try this:
>
> 
>  $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM 
> cm_index",$dbh)); echo " value='".$record['wel_area']."' cols='25' 
> rows='8'> value='save'>\n"; ?>
> 
>
> If not then let me know...
>
>
> Thank you,
>
> Ray Hunter
> Firmware Engineer
>
> ENTERASYS NETWORKS
>
>
> -Original Message-
> From: jas [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 17, 2002 11:54 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] textarea and mysql query
>
>
> I need some help with a query to place the results within a text 
> area... here is the code and so far every time I try it out all that 
> happens is it displays the textbox but not the results of the query. 
>  method="post" action="index_confirm.php3 target="box">
>  $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM 
> cm_index",$dbh)); echo " value='{$record['wel_area']}' cols='25' rows='8'> type='submit' name='save' value='save'>\n"; ?>
>   
> Any help would be great.
> Jas
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] textarea and mysql query

2002-03-18 Thread jas

Sorry, the connection is established already so that part works just fine.
It is getting the results of said connection \ query to appear in a textarea
vs. a text line.
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Monday 18 March 2002 14:53, jas wrote:
>
> > I need some help with a query to place the results within a text area...
> > here is the code and so far every time I try it out all that happens is
it
> > displays the textbox but not the results of the query.
> >   > $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> > cm_index",$dbh));
> > echo " > rows='8'> > value='save'>\n";
> > ?>
> >   
>
>
> If this is *all* your code then you're missing the important step of
> connecting to the mysql server and selecting a database.
>
> Have a look at the examples in the manual.
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> Most people don't need a great deal of love nearly so much as they need
> a steady supply.
> */



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] textarea and mysql query

2002-03-18 Thread jas

Yeah that didn't work either... If I put the same value (
value=\"{$record['wel_area']}\" ) on a text line it works just fine however
using the same value for a textarea doesnt give me any results nor does it
give me an error message to go on, if there is a way to output the code to
the screen like a dos echo command that would help out alot.  Thanks in
advance,
Jas
"Ray Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Try this:
>
> 
>  $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> cm_index",$dbh));
> echo " rows='8'> value='save'>\n";
> ?>
> 
>
> If not then let me know...
>
>
> Thank you,
>
> Ray Hunter
> Firmware Engineer
>
> ENTERASYS NETWORKS
>
>
> -Original Message-
> From: jas [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 17, 2002 11:54 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] textarea and mysql query
>
>
> I need some help with a query to place the results within a text area...
> here is the code and so far every time I try it out all that happens is it
> displays the textbox but not the results of the query.  method="post" action="index_confirm.php3 target="box">
>  $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> cm_index",$dbh)); echo " value='{$record['wel_area']}' cols='25' rows='8'> type='submit' name='save' value='save'>\n"; ?>
>   
> Any help would be great.
> Jas
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] textarea and mysql query

2002-03-18 Thread Jason Wong

On Monday 18 March 2002 14:53, jas wrote:

> I need some help with a query to place the results within a text area...
> here is the code and so far every time I try it out all that happens is it
> displays the textbox but not the results of the query.
>   $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> cm_index",$dbh));
> echo " rows='8'> value='save'>\n";
> ?>
>   


If this is *all* your code then you're missing the important step of 
connecting to the mysql server and selecting a database.

Have a look at the examples in the manual.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Most people don't need a great deal of love nearly so much as they need
a steady supply.
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] textarea and mysql query

2002-03-18 Thread Hunter, Ray

Try this:


\n"; 
?>


If not then let me know...


Thank you,

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: jas [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, March 17, 2002 11:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] textarea and mysql query


I need some help with a query to place the results within a text area...
here is the code and so far every time I try it out all that happens is it
displays the textbox but not the results of the query. 
\n"; ?>
  
Any help would be great.
Jas



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php