ID:               32230
 User updated by:  amal_omairi at yahoo dot com
 Reported By:      amal_omairi at yahoo dot com
 Status:           Bogus
 Bug Type:         Output Control
 Operating System: Windows XP Pro
 PHP Version:      4.3.10
 New Comment:

thank you for repling. actually addslashes and strip slashes are used.
you say it is not a php error so do you think the use of
html_entity_decode() nor htmlspecialchars()? what do you advice me to
do? thank you again:-)


Previous Comments:
------------------------------------------------------------------------

[2005-03-08 10:43:54] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Even if you think it is not a bug, we often know better than you,
please consult the support channels first before even considering
to reopen this report.

Thank you for your interest in PHP.

.

------------------------------------------------------------------------

[2005-03-08 09:06:05] amal_omairi at yahoo dot com

Description:
------------
i work on a content management area system. where user text inserted to
a table in MySQL database and then reteived for preview in  atext area.
but when user types a single quote it is previewed as double quotes.
the magic_quotes_gpc is on, and magic_quotes_sybase is off. addslashes
is not used but stripslashes is used when retrieval from databse.
please help. 

Reproduce code:
---------------
 <?
    include ("../../conn.php");
    include ("../../db.php");

    $table_name = "menu2_1";

      if (isset($mode))
      if (strstr($mode,"prev") != "")
            $table_name .= "_prev";

        $query = "select  *  from ".$table_name;
        $result = mysql_query($query);
    $num = mysql_num_rows($result);
    $row = mysql_fetch_row($result);
    if(!$num)
       {
            $query = "insert into  ".$table_name." (content) values
('')";
            $result = mysql_query($query);
       }
?>

....
<TD nowrap  valign=top><TEXTAREA  name="article" rows="5" 
class=textarea1><?=stripslashes($row[0])?></TEXTAREA></TD> 



Expected result:
----------------
preview single quote.

Actual result:
--------------
previwes double qoutes instead.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32230&edit=1

Reply via email to