I get this error:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\login\dbconnect.php:3 Stack trace: #0 C:\xampp\htdocs\login\index.php(3): include_once() #1 {main} thrown in C:\xampp\htdocs\login\dbconnect.php on line 3
This is how my Code looks like
<?php
error_reporting( E_ALL & ~E_DEPRECATED & ~E_NOTICE );
if(!mysql_connect("localhost","root",""))
{
die('oops connection problem ! --> '.mysql_error());
}
if(!mysql_select_db("dbtest"))
{
die('oops database selection problem ! --> '.mysql_error());
}
?>