PDA

View Full Version : echo to text box - only first word returned


chesneil
07-27-2003, 07:46 AM
Hi guys,
I'm echoing values from a db to text boxes, but only the first words are returned. The db field is set to varchar(255). Can someone please tell me how to solve this small but annoying problem? Thanks. By the way, I don't have any regular expressions or that kind of coding: I don't understand them :p.

oracleguy
07-27-2003, 07:59 AM
Which lanugage are you writing your server side code in?

What is probably happening is that your not putting the values for the text box's attributes in quotes.

e.g.

<input type="text" name="blah" value="This is a test" />

Without the quotes, it only recognizes the first word.

chesneil
07-27-2003, 08:16 AM
I'm using PHP. Yes, you're right. I only had one set of quotes. I get confused with more than one set :). This is what it should be:

<input type=text name=editoedets value=\"".$dbvalue."\">

Thanks a lot.