Quotes problem

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? ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-01-2004
proNick
 
Posts: n/a
Default Quotes problem

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
:-(((


Reply With Quote
  #2 (permalink)  
Old 03-01-2004
Filth
 
Posts: n/a
Default Re: Quotes problem

> 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


Reply With Quote
  #3 (permalink)  
Old 03-01-2004
Andy Hassall
 
Posts: n/a
Default Re: Quotes 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>
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:52 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0