I have a mySQL database where the primary key is a string that is a username and a field is a URL. The username is passed through the url, and the url is printed out. However, I cant get the code to work. What am I doing wrong?
<html>
<head>
<title>Query string</title>
</head>
<body>
<?php
$con = mysql_connect("na","na","na");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("na", $con);
$query="SELECT * FROM `na`.`na` WHERE 'Username' = '" . $_GET["username"] . "'";
$data = mysql_query($query) or die('Could not connect: ' . mysql_error());
while($info = mysql_fetch_array($data))
{
Print "URL>>".$info['Url'] . "URL>>" ;
}
?>
</body>
</html>