function : mysql_real_escape_string?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
andrewt
Forum Newbie
Posts: 11
Joined: Fri Aug 08, 2003 8:18 am
Location: Sydney, Australia

function : mysql_real_escape_string?

Post by andrewt »

Has anyone having trouble with this function :

mysql_real_escape_string

I wrote :

Code: Select all

$itemo = mysql_real_escape_string("Lar's Item, %_.  is not red"); //Line 3
	
	echo $itemo . "<br>";
and it gave me this error :

Fatal error: Call to undefined function: mysql_real_escape_string() in /var/www/html/test.php on line 3
qartis
Forum Contributor
Posts: 271
Joined: Sat Dec 14, 2002 4:43 pm
Location: BC, Canada
Contact:

Post by qartis »

mysql_real_escape_string() only exists in PHP version 4.3.0 and higher, that's probably your problem.
andrewt
Forum Newbie
Posts: 11
Joined: Fri Aug 08, 2003 8:18 am
Location: Sydney, Australia

Cheers Qartis.

Post by andrewt »

:wink:

I've ONLY installed my LINUX, MYSQL, PHP 2 week....
and I thought that my PHP is the latest version... (I've PHP 4.2.2).

Thanks again Qartis..
Post Reply