note 123588 added to function.mysqli-escape-string

From: Date: Thu, 07 Feb 2019 16:12:20 +0000
Subject: note 123588 added to function.mysqli-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-210196@lists.php.net to get a copy of this message
I'm not sure why $string = $conn->escape_string($_POST["data"]); has been downvoted into obvlivian, but it is the only thing that works if you're using the mysqli class. For example <?php print "function output: " . mysqli_escape_string($_REQUEST["foo"]) . "\n"; print "method output: " . $mysqli->escape_string($_REQUEST["foo"]) . "\n"; ?> prints: function output: method output: bar This is with php 7.0 ---- Server IP: 208.43.231.9 Probable Submitter: 82.199.157.35 (proxied: 128.172.48.70) ---- Manual Page -- http://php.net/manual/en/function.mysqli-escape-string.php Edit -- https://master.php.net/note/edit/123588 Del: integrated -- https://master.php.net/note/delete/123588/integrated Del: useless -- https://master.php.net/note/delete/123588/useless Del: bad code -- https://master.php.net/note/delete/123588/bad+code Del: spam -- https://master.php.net/note/delete/123588/spam Del: non-english -- https://master.php.net/note/delete/123588/non-english Del: in docs -- https://master.php.net/note/delete/123588/in+docs Del: other reasons-- https://master.php.net/note/delete/123588 Reject -- https://master.php.net/note/reject/123588 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#210196) next »