Topic awaiting preservation: escape string (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: 1393 |
posted 12-20-2006 05:16
If I escape a string with something like code: format_data($string){ if(function_exists("mysql_real_escape_string")) { $string = mysql_real_escape_string($string); } else { $string = addslashes($string); } return $string;} Should I be able to see the "escaping" characters in the database? For example "redroy's house" would be seen in the database as "redroy\'s house". Using like this code: $var = format_data($_POST['var']); mysql_query("INSERT INTO table VALUES ($var)");
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 12-20-2006 09:03
No you shouldn't. They are not stored in the database - they are only used for escaping in-band characters in sql. |
Paranoid (IV) Inmate From: 1393 |
posted 12-20-2006 18:01
Excellent thanks! I thought I was loosing my mind |