#32376 [NEW]: error with save php code in data base
| From: | mangawy1 at hotmail dot com | Date: | Sat, 19 Mar 2005 20:36:41 +0000 |
| Subject: | #32376 [NEW]: error with save php code in data base | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-75532@lists.php.net to get a copy of this message | ||
From: mangawy1 at hotmail dot com
Operating system: winxp
PHP version: 4.3.10
PHP Bug Type: *Database Functions
Bug description: error with save php code in data base
Description:
------------
i try to save php source code in database but it can't be save and display
syntax error in sql statment
Reproduce code:
---------------
<form method=\"post\" action=\"$PHP_SELF?action=doinsert\">
<textarea dir=\"ltr\" name=\"funexampls\" rows=\"60\"
cols=\"50\"></textarea><br>
<input type=\"submit\" name=\"$submit\">
if ($submit){
$result= mysql_query("insert into functions values
('$funexampls')") or die (mysql_error() );;
Expected result:
----------------
i'm try to wirte this php code in textarea
<?php
if (!isset($_COOKIE))$counter1=1;
setcookie('login2',$counter);
$counter=$_COOKIE[login2]+1;
setcookie('login2',$counter);
echo $counter;
?>
to be save in database
but this error massage display:
You have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near
'login2',$counter); $counter=$_COOKIE[login2]+1; setcookie('lo
--
Edit bug report at http://bugs.php.net/?id=32376&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32376&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32376&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32376&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32376&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32376&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32376&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32376&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32376&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32376&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32376&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32376&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32376&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32376&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32376&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32376&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32376&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32376&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32376&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32376&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32376&r=mysqlcfg