Jump to content

[SOLVED] problem with links


gli

Recommended Posts

<?php require_once("databasec.php"); ?>
<?php

$query = "SELECT * FROM users"; 

$result = mysql_query($query) or die(mysql_error());


while($row = mysql_fetch_array($result)){
echo $row['username']. " - ". $row['country'];
echo "<br />";
}
?>

 

hi! i need to make link for $row['username'] but link like profile.php?user=$row['username']

Link to comment
https://forums.phpfreaks.com/topic/101757-solved-problem-with-links/
Share on other sites

<?php require_once("databasec.php"); ?>
<?php

$query = "SELECT * FROM users"; 

$result = mysql_query($query) or die(mysql_error());

while($row = mysql_fetch_array($result)){
echo "<a href='profile.php?user={$row['username']}'>{$row['username']}</a> - {$row['country']}<br />";
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.