Menu
Why do I get this parse error message when I try to insert an ip into the data base.
[QUOTE]
Parse error: syntax error, unexpected T_DNUMBER
Below is my code
[code=php]
$ip2=219.90.90.2;
$ip2=mysql_real_escape_string($ip2);
mysql_query(“INSERT INTO table_name(ip_string)
VALUES($ip2)”);
Now if I try to put single or double quote like this
[code=php] $ip2=’219.90.90.2′
the error will be gone, but it will not insert into the data base