I am creating a category list of fetched data and want to show it as link. when someone click on the fetched list from database it must open in new tab. My code is working as it should but i want to open a new tab when someone clicks on the link with username fetched from db
what should i add to my code create a href link with username fetched from database which will open in new tab when clicked . i want convert my fetched data into link like this https://stackoverflow.com/shubhamenter image description here
<?php
session_start();
if(isset($_SESSION['USERNAME']))
{
}
else
{
header('Location:index.php');
}
?>
<html>
<body>
<?php
include 'inc.config.php';
$query=mysql_query("SELECT * FROM logsignup ");
while($row = mysql_fetch_array($query))
{
echo"<a href='#'>";
echo $row['username'] ;
echo"</a>";
echo "<br />";
}
?>
</body>
</html>
output:-
ankit pande
sachin
sachin
sachine
akhilesh ya
shivam
123
hello