Skip to content
Advertisement

Uncaught Error: Call to undefined function mysql_select_db()

I’m trying to fetch data from the database using Xamp Server but am getting this error.

Fatal error: Uncaught Error: Call to undefined function mysql_select_db() in E:xamphtdocsPoliceAppNewsfetch.php:10 Stack trace: #0 {main} thrown in E:xamphtdocsPoliceAppNewsfetch.php on line 10

Below is my php script , am still new in php please help me out on this. But i read all the other Posts here but it seems it’s confusing to me,how can I make it right please.

JavaScript

Advertisement

Answer

As per your request i have modified code.

JavaScript

Please note: you need to add error checking. Also note just typed in here (not tested), so bear with me if there are some errors.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement