svn: /phpdoc/fr/trunk/reference/info/functions/ get-magic-quotes-gpc.xml
| From: | Yannick Torres | Date: | Mon, 19 Apr 2010 16:26:46 +0000 |
| Subject: | svn: /phpdoc/fr/trunk/reference/info/functions/ get-magic-quotes-gpc.xml | ||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-7913@lists.php.net to get a copy of this message | ||
yannick Mon, 19 Apr 2010 16:26:46 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=298175
Log:
Sync with EN
Changed paths:
U phpdoc/fr/trunk/reference/info/functions/get-magic-quotes-gpc.xml
Modified: phpdoc/fr/trunk/reference/info/functions/get-magic-quotes-gpc.xml
===================================================================
--- phpdoc/fr/trunk/reference/info/functions/get-magic-quotes-gpc.xml 2010-04-19 16:17:00 UTC (rev
298174)
+++ phpdoc/fr/trunk/reference/info/functions/get-magic-quotes-gpc.xml 2010-04-19 16:26:46 UTC (rev
298175)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 298127 Maintainer: yannick Status: ready -->
+<!-- EN-Revision: 298138 Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.get-magic-quotes-gpc" xmlns="http://docbook.org/ns/docbook">
@@ -50,12 +50,16 @@
echo $_POST['lastname']; // O\'reilly
echo addslashes($_POST['lastname']); // O\\\'reilly
-if (!get_magic_quotes_gpc()) {
- $lastname = addslashes($_POST['lastname']);
-} else {
+if (get_magic_quotes_gpc()) {
+ $lastname = stripslashes($_POST['lastname']);
+}
+else {
$lastname = $_POST['lastname'];
}
+// Si vous utilisez MySQL
+$lastname = mysql_real_escape_string($lastname);
+
echo $lastname; // O\'reilly
$sql = "INSERT INTO lastnames (lastname) VALUES ('$lastname')";
?>