-3

hello i want to use a function of php (ereg_replace) for inserting data into my database but I am receiving this error saying

Deprecated: Function ereg_replace() is deprecated in C:\xampp\htdocs\spdealers\Admin Panel\Property_Insert_Page_exe.php on line 3

any one please ???

here is the php code : $propertyid = ereg_replace("[^A-Za-z0-9-]", "", $_POST['propertyid'])

Mr. Alien
  • 153,751
  • 34
  • 298
  • 278

1 Answers1

1

The question is already available on stackoverflow. Please at least search on Stackoverflow, Please check the below links:-

Function ereg_replace() is deprecated - How to clear this bug?

How to solve the use of deprecated function ereg() of PHP 5.3.0 in Drupal 6.13

Function ereg() is deprecated

switch to preg_replace() , and refer to the below link for the differences http://php.net/reference.pcre.pattern.posix

Community
  • 1
  • 1
Nishant
  • 3,614
  • 1
  • 20
  • 26