too long

I am using Localhost with UniServer, running Apache and MySQL. (There is no username or password)
I have the code new mysqli("http://localhost/us_phpmyadmin/","","","url_short"); to connect to my Localhost server, but when I try to run the code mysqli_query("INSERT INTO cut.it VALUES (NULL, $longurl, $shorturl)"); , the error php_network_getaddresses: getaddrinfo failed: No such host is known. comes up on the page. Why is this and how can I get around it?

You have to specify the hostname of MySQL instance not a url for phpMyAdmin.

Change

... mysqli("http://localhost/us_phpmyadmin/","","","url_short");

to

... mysqli("localhost", "", "", "url_short");
            ^^^^^^^^^