this is my code to connect my .php file to my databse:
$serverName="localhost";
$username="root";
$password="ichhya123";
$dbName="teacher";
$conn=mysqli_connect("$serverName","$username","$password","$dbName");
echo "Connected";
if(!$conn){
die("Connection failed:".mysqli_connect_error());}
however, when i try to run it using xampp in google chrome using
http://localhost/phpmyadmin/teacher-login.php, it gives me this error message:
Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404 localhost Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.0
teacher-login.phpinwwwfolder and runhttp://localhost/teacher-login.php. - Harshad Pansuriya