|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32376 error with save php code in data base
Submitted: 2005-03-19 21:36 UTC Modified: 2005-03-19 21:40 UTC
From: mangawy1 at hotmail dot com Assigned:
Status: Not a bug Package: *Database Functions
PHP Version: 4.3.10 OS: winxp
Private report: No CVE-ID: None
 [2005-03-19 21:36 UTC] mangawy1 at hotmail dot com
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

if (!isset($_COOKIE))$counter1=1;
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-19 21:40 UTC]
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 as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jun 15 11:01:24 2021 UTC