i am trying to connect my database to XAMP . I got this error
Warning: Use of undefined constant ID – assumed 'ID' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\Thairis\login.php on line 8
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\Thairis\connectdb.php:27 Stack trace: #0 C:\xampp\htdocs\Thairis\login.php(11): include() #1 {main} thrown in C:\xampp\htdocs\Thairis\connectdb.php on line 27
Best Answer
mysql_* functions
So switch to mysqli or pdo and use always prepared statements with parameters because of sql injections
see api comparison