This is a discussion on Quotes problem within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi! I have problem showing double quotes in form, when reading data from database. Can you help me with that? ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi!
I have problem showing double quotes in form, when reading data from database. Can you help me with that? My php.ini file contains: magic_quotes_gpc = Off magic_quotes_runtime = Off magic_quotes_sybase = Off .... and I can submit via INPUT TYPE=text text like This is a "quote", but when I want to display that data in form, I loose text after quotes, and I get only This is a . Can you help me? It is now really PITA for me :-((( |
|
|||
|
> I have problem showing double quotes in form, when reading data from
> database. Can you help me with that? > > My php.ini file contains: > > magic_quotes_gpc = Off > magic_quotes_runtime = Off > magic_quotes_sybase = Off > > > ... and I can submit via INPUT TYPE=text text like This is a "quote", but > when I want to display that data in form, I loose text after quotes, and I > get only This is a . Sounds like you are not running it through addslashes http://uk2.php.net/manual/en/function.addslashes.php try that it should solve your problem |
|
|||
|
On Mon, 1 Mar 2004 13:42:29 -0000, "Filth" <p.macdonald@blueyonder.co.uk>
wrote: >> I have problem showing double quotes in form, when reading data from >> database. Can you help me with that? >> >> My php.ini file contains: >> >> magic_quotes_gpc = Off >> magic_quotes_runtime = Off >> magic_quotes_sybase = Off >> >> >> ... and I can submit via INPUT TYPE=text text like This is a "quote", but >> when I want to display that data in form, I loose text after quotes, and I >> get only This is a . > >Sounds like you are not running it through addslashes > >http://uk2.php.net/manual/en/function.addslashes.php > >try that it should solve your problem That would be htmlspecialchars with the appropriate flags or htmlentities, not addslashes, if he's displaying it in a form. HTML does not use a slash to escape characters. -- Andy Hassall <andy@andyh.co.uk> / Space: disk usage analysis tool <http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space> |