SSK
SSK

Reputation: 285

How to solve Function sql_regcase() is deprecated issue in php

Hello all i have coded following Program to secure the application. But after executing , i am getting following error Check here PHP code

http://pastebin.com/cgG5ezeg

Output :

Deprecated: Function sql_regcase() is deprecated in /home/admin/public_html/test/protect.php on line 6

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'root'@'localhost' (using password: NO) in /home/admin/public_html/test/protect.php on line 9

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/admin/public_html/test/protect.php on line 9

As well as please suggest me more secure way !

Thanks in advance

Upvotes: 1

Views: 2210

Answers (2)

NullPoiиteя
NullPoiиteя

Reputation: 57322

regarding the sql_regcase function: it was deprecated in PHP V5.3.0 and shouldn't be used any longer.

Look at the PCRE extension.

note: use of mysql_* function is deprecated too so use pdo or mysqli

Upvotes: 1

웃웃웃웃웃
웃웃웃웃웃

Reputation: 11984

Don't use deprecated functions.

The second warning is due to database connection failure. You had set "no" in the place of database password. change this and give your database password. it will work.

Upvotes: 0

Related Questions