Skip to main content
Removed tag from title.
Source Link
user212218
user212218

Why does my mysql_real_escape_string not work(PHP) ?

I have read many about SQL-Injection"Injection. But it does not work with this code:

$inputform= $_GET["password"];
$query = "INSERT INTO user(password) VALUES ('".mysql_real_escape_string($inputform)."')";  

For example I use this example: O'Conner. When I submit it and look in my table there is O'Connor and not O\'Conner.

thanks

Why does my mysql_real_escape_string not work(PHP) ?

I have read many about SQL-Injection". But it does not work with this code:

$inputform= $_GET["password"];
$query = "INSERT INTO user(password) VALUES ('".mysql_real_escape_string($inputform)."')";  

For example I use this example: O'Conner. When I submit it and look in my table there is O'Connor and not O\'Conner.

thanks

Why does my mysql_real_escape_string not work?

I have read many about SQL-Injection. But it does not work with this code:

$inputform= $_GET["password"];
$query = "INSERT INTO user(password) VALUES ('".mysql_real_escape_string($inputform)."')";  

For example I use this example: O'Conner. When I submit it and look in my table there is O'Connor and not O\'Conner.

thanks

added 5 characters in body; edited tags
Source Link
Gumbo
  • 657.6k
  • 112
  • 793
  • 852

I have read many about "SQLSQL-Injection". But it does not work with this code:

` $inputform= $_GET["password"]; $query = "INSERT INTO user(password) VALUES ('".mysql_real_escape_string($inputform)."')";

`

$inputform= $_GET["password"];
$query = "INSERT INTO user(password) VALUES ('".mysql_real_escape_string($inputform)."')";  

For example I use this example: O'ConnerO'Conner. When I submit it and look in my table there is O'ConnorO'Connor and not O'ConnerO\'Conner.

thanks

I have read many about "SQL-Injection". But it does not work with this code:

` $inputform= $_GET["password"]; $query = "INSERT INTO user(password) VALUES ('".mysql_real_escape_string($inputform)."')";

`

For example I use this example: O'Conner. When I submit it and look in my table there is O'Connor and not O'Conner.

thanks

I have read many about SQL-Injection". But it does not work with this code:

$inputform= $_GET["password"];
$query = "INSERT INTO user(password) VALUES ('".mysql_real_escape_string($inputform)."')";  

For example I use this example: O'Conner. When I submit it and look in my table there is O'Connor and not O\'Conner.

thanks

Source Link
php
  • 21
  • 2

Why does my mysql_real_escape_string not work(PHP) ?

I have read many about "SQL-Injection". But it does not work with this code:

` $inputform= $_GET["password"]; $query = "INSERT INTO user(password) VALUES ('".mysql_real_escape_string($inputform)."')";

`

For example I use this example: O'Conner. When I submit it and look in my table there is O'Connor and not O'Conner.

thanks