Skip to content

Commit

Permalink
Added condition to mysql_real_escape_string to handle earlier version…
Browse files Browse the repository at this point in the history
…s of php

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@101 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Mar 21, 2003
1 parent 031f3b3 commit a3fcd3a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.php
Expand Up @@ -266,7 +266,14 @@
$col_name .= ", " . substr($value, 1); //Add separator and strip off leading 'F'
if (get_magic_quotes_gpc() == "0")
{
$values .= ", '" . mysql_real_escape_string($$value, "'") . "'";
if (phpversion() >= "4.3.0")
{
$values .= ", '" . mysql_real_escape_string($$value, "'") . "'";
}
else
{
$values .= ", '" . mysql_real_escape_string($$value, "'") . "'";
}
}
else
{
Expand Down

0 comments on commit a3fcd3a

Please sign in to comment.