diff --git a/reference/mysql/functions/mysql-real-escape-string.xml b/reference/mysql/functions/mysql-real-escape-string.xml index d587a366c2..20eb5448f9 100644 --- a/reference/mysql/functions/mysql-real-escape-string.xml +++ b/reference/mysql/functions/mysql-real-escape-string.xml @@ -1,5 +1,5 @@ - + mysql_real_escape_string @@ -121,30 +121,44 @@ SELECT * FROM users WHERE user='aidan' AND password='' OR ''='' 0) { + echo "Product inserted\n"; + } } - // Quote if not a number or a numeric string - if (!is_numeric($value)) { - $value = "'" . mysql_real_escape_string($value) . "'"; - } - return $value; +} else { + echo "Fill the form properly\n"; } - -// Connect -$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password') - OR die(mysql_error()); - -// Make a safe query -$query = sprintf("SELECT * FROM users WHERE user=%s AND password=%s", - quote_smart($_POST['username']), - quote_smart($_POST['password'])); - -mysql_query($query); ?> ]]>