|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-19 21:40 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 10 07:00:01 2025 UTC |
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