Reputation: 21
I would like to put a link in my HTML site to access my database. However, my database is localhost/abc.php (located inside xampp/htdocs).
I was wondering how to add the link because it it a localhost document. I could not do it with the <a href="localhost/abc.php">
or the c:///xampp/htdocs/abc.php
.
Upvotes: 2
Views: 12861
Reputation: 887453
<a href="localhost/abc.php">
is a relative URL.
It points to a directory named localhost
in the directory of the current URL.
You need an absolute URL: http://localhost/...
Upvotes: 5
Reputation: 723
use
<a href="http://localhost/abc.php">to my db</a>
that will work.
In detail:
"localhost" is the hostname of the url your are pointing to.
It needs to be prefixed with the protocol you are using. In this case http://
Happy new year.
Upvotes: 3