Code: Select all
function escape($data)
{
global $connect;
if (ini_get('magic_quotes_gpc'))
{
$data = stripslashes($data);
}
return mysql_real_escape_string(trim($data), $connect);
}//end of escape() function.Moderator: General Moderators
Code: Select all
function escape($data)
{
global $connect;
if (ini_get('magic_quotes_gpc'))
{
$data = stripslashes($data);
}
return mysql_real_escape_string(trim($data), $connect);
}//end of escape() function.Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]Code: Select all
<?php
function escape($data) // function named escape with starting value $data var
{
global $connect; // var named $connect set as global
if (ini_get('magic_quotes_gpc')) // Returns the value of the configuration option on success. Failure, such as querying for a non-existent value, will return an empty string.
{
$data = stripslashes($data); // Returns a string with backslashes stripped off. (\' becomes ' and so on.) Double backslashes (\\) are made into a single backslash (\)
}
return mysql_real_escape_string(trim($data), $connect); connect with ......
}
?>Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]