note 81614 added to function.mysql-real-escape-string

From: Date: Thu, 06 Mar 2008 08:37:27 +0000
Subject: note 81614 added to function.mysql-real-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-136784@lists.php.net to get a copy of this message
One solution that I found for the quote problem is to replace quote by equivalent html number. That is, quote symbol ' can be replaced by ' Similarly backslash can be replaced by \ This would solve the problem of SQL injection and also would not cause any issues on HTML forms as the HTML numbers would be displayed as equivalent symbol to the user. Also, you need not escape intended quotes and backslash before inserting into MySQL database. ---- Server IP: 209.41.74.194 Probable Submitter: 20.139.67.50 (proxied: 20.198.56.73) ---- Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php Edit -- https://master.php.net/note/edit/81614 Del: integrated -- https://master.php.net/note/delete/81614/integrated Del: useless -- https://master.php.net/note/delete/81614/useless Del: bad code -- https://master.php.net/note/delete/81614/bad+code Del: spam -- https://master.php.net/note/delete/81614/spam Del: non-english -- https://master.php.net/note/delete/81614/non-english Del: in docs -- https://master.php.net/note/delete/81614/in+docs Del: other reasons-- https://master.php.net/note/delete/81614 Reject -- https://master.php.net/note/reject/81614 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136784) next »