7

Fatal error: Call to undefined function mysql_real_escape_string() in /var/www/engine/database.php on line 38

I can still connect to the database however. Why is it not available?

I am using PHP version 7.1.4

Masivuye Cokile
  • 4,754
  • 3
  • 19
  • 34
Jon Andrews
  • 373
  • 2
  • 4
  • 16

2 Answers2

7

mysql_ has been removed in php 7. try mysqli_real_escape_string instead of mysql_real_escape_string.

Bhunesh Satpada
  • 770
  • 1
  • 6
  • 19
1

The mysql extension has been deprecated from PHP 5.5. Use mysqli extension should be used.

You can try mysqli_real_escape_string() for your PHP Version.