#32230 [Opn->Bgs]: single quotes
| From: | derick@php.net | Date: | Tue, 08 Mar 2005 09:43:56 +0000 |
| Subject: | #32230 [Opn->Bgs]: single quotes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75104@lists.php.net to get a copy of this message | ||
ID: 32230
Updated by: derick@php.net
Reported By: amal_omairi at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: Output Control
Operating System: Windows XP Pro
PHP Version: 4.3.10
New Comment:
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.
.
Previous Comments:
------------------------------------------------------------------------
[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