mysql_escape_string()
Posted: Mon Jan 09, 2006 3:15 pm
HI Everyone how do I un escape string the data ?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
function SqlClean ($string)
{
if (get_magic_quotes_gpc()) {
$string = stripslashes($string);
}
return mysql_real_escape_string($string);
}
$query = "SELECT `column` FROM `table` WHERE `column` = '" . SqlClean($value) . "'");
?>