Reputation: 285
Hello all i have coded following Program to secure the application. But after executing , i am getting following error Check here PHP code
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
Reputation: 57322
regarding the sql_regcase function: it was deprecated in PHP V5.3.0 and shouldn't be used any longer.
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