First off I don't know where "site_link" is coming from or how it is formatted. I would store the link in the database with "file_name" and format it something like this:
http://your.website.com
This would allow you to change 2 lines of code and get your script working. The first line you would change would be your select statement. Change it from:
"SELECT file_name FROM sites"
to
"SELECT file_name, site_link FROM sites".
The second line to change would be where you echo your link. Change it from:
echo("<p><a href=\"http://localhost\" target=\"_blank\">" . $row["file_name"] . "</a></p>\n");
to
echo("<p><a href=\"" . $row["site_name"] . "\" target=\"_blank\">" . $row["file_name"] . "</a></p>\n");
I hope this helps you out a bit.
Atom