php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mangawy1 at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-03-19 21:36 UTC] mangawy1 at hotmail dot com
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-19 21:40 UTC] sniper@php.net
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.  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-2020 The PHP Group
All rights reserved.
Last updated: Fri Sep 18 18:01:26 2020 UTC