1

I get this error when I submit the login form.

The database named login does exist.

you can see it here

The error picture

I'm using wamp

This is the PHP code:

$servername ="localhost";
$dBUsername="root";
$dBPassword="";
$dBName="login";

$conn=mysqli_connect($servername,$dBUsername,$dBPassword,$dBName);

if (!$conn) {
die("Ni uspilo:".mysqli_connect_error());
}
Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119
  • i experienced strange errors like this too in wampp or some other "cool" webservers. i suggest you to download and use apachefriends.org ,xampp and you will be surprised.I use xampp since 2002 and i have no surprises like this one. –  May 01 '20 at 12:16
  • @Constantin WAMP works just as well as any other web server. – Jay Blanchard May 01 '20 at 12:18
  • yeah i know that: with several errors.. free –  May 01 '20 at 12:19
  • 1
    XAMPP is free too, so I am not getting your point @Constantin – Jay Blanchard May 01 '20 at 12:22
  • OP change `$servername ="localhost";` to `$servername ="localhost:3308";` as WAMP installs MySQL and MariaBB databases and typically runs the MySQL database on port 3308. – Jay Blanchard May 01 '20 at 12:24
  • you should try use in develop xampp to understand the point –  May 01 '20 at 15:00

0 Answers0