Jump to content

Mysql_Real_Escape_String Magic Quotes


vinpkl

Recommended Posts

hi

 

So I will have to convert all my present code

 

<?
$name = mysql_real_escape_string($_POST['name']);
$email = mysql_real_escape_string($_POST['email']);
$detail = mysql_real_escape_string($_POST['detail']);
?>

 

to like the below code on every page

 

<?
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc())
{
   $name = stripslashes($_POST['name']);
   $email = stripslashes($_POST['email']);
   $detail = stripslashes($_POST['detail']);
}
$name = mysql_real_escape_string($_POST['name']);
$email = mysql_real_escape_string($_POST['email']);
$detail = mysql_real_escape_string($_POST['detail']);
?>

 

vineet

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.