You are here: Quotes from Db into textfield « PHP Programming Language « IT news, forums, messages
Quotes from Db into textfield

Posted by frizzle on 03/01/06 16:29

Hi there,

i have a problem of wich i doubt it can be solved properly:
If i call a text from a (mySQL) database, and want to echo it into a
textfield (e.g. in a form) i experience the following problem (wich
makes sense, but wich i can't solve):

Imagine the following:
>> $db_string = 'The speech started as following: "Ladies and Gentlemen!".';

Source php:
>> <input name="textfield" type="text" value="<?php echo $db_string; ?>">

Source html:
>> <input name="textfield" type="text" value="The speech started as following: "Ladies and Gentlemen!".">

Wich only displays on the site:
>> The speech started as following:

Makes sense to me, but i cannot figure out how to solve it ...
(escaping with \" makes the backslash the last char)

Frizzle.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация