Issue
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
Solution
XAMPP cannot find your .php file. Please check:
- Your file should be here: xampp\htdocs\
- File name (it should be:
teacher-login.php
)
Answered By - Riccardo Zunino
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.